当前位置:网站首页>32 single chip microcomputer has more than one variable Used in C

32 single chip microcomputer has more than one variable Used in C

2022-06-23 04:40:00 Snow without fragrance

Way : Normally define a variable in other files ( Can be initialized ), The main function or other functions need to use this variable . Add... Before the variable definition extern( Uninitialized )

key.c In file

uint16_t a;

main.c In file

int main(void)

{

extern uint16_t a;

}

原网站

版权声明
本文为[Snow without fragrance]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206222333308250.html