강의

멘토링

커뮤니티

Inflearn Community Q&A

yhy12540722's profile image
yhy12540722

asked

Learning data structures and various examples in C

Stack concept and implementation (3)

stack 구현에서 동적할당중 형변환의 유무에 관한 질문

Written on

·

285

0

안녕하세요, 강의 잘 수강하고 있습니다. 다름이 아니라, array를 이용한 stack의 create()함수에서는 Stack s = (Stack)malloc(sizeof(struct stack_type))을 썼는데, linked list를 이용한 stack의 create()함수에서는, malloc 앞에 (Stack)가 빠져있습니다. 혹시, 형변환을 하지 않아도 되는 특별한 이유라도 있는건가요??

c

Answer

This question is waiting for answers
Be the first to answer!
yhy12540722's profile image
yhy12540722

asked

Ask a question