RFQ/BOM 0 로그인 / 등록하다

귀하의 위치를 선택하세요

사용자 이미지

Why does certain variable redefinition always appear when I call the header file of a sub-function?

Hardware design
11월 23, 2020 by Leonardo 365

I need to get the value of a in the sub-function. I defined a in the header file of the sub-function. At the same time, I explained the header file of the sub-function in the main function. Then a redefinition appeared when compiling. I put a in the sub-function. The definition is fine.

모든 댓글

user image

Angela 게시 날짜 November 23, 2020

MDK, you cannot define variables in the header file! ! !

0
user image

Quinn 게시 날짜 November 23, 2020

Well, I know, what if I capture an array in void TIM3_IRQHandler(void) in it.c. This array is only defined in the interrupt function. Now I want to use this number in the main function.

0
user image

Eduardo 게시 날짜 November 23, 2020

But there is a main.c(140): error: #20: identifier "time_data" is undefined problem

0

답변 작성

답글을 달려면 로그인이 필요합니다. 로그인 | 등록하다