I have been seeing a strange behaviour in my C applications in SDK.
Suppose I define a global variable like int X; outside the main() subroutine in main.c
If I try to use that global variable in another file, say, echo.c, I get an error message that the variable in undeclared and is being used for the first time in this function (Inside echo.c).
Question
Antonio Fasano
Hi, Guys,
I have been seeing a strange behaviour in my C applications in SDK.
Suppose I define a global variable like int X; outside the main() subroutine in main.c
If I try to use that global variable in another file, say, echo.c, I get an error message that the variable in undeclared and is being used for the first time in this function (Inside echo.c).
What am I doing wrong ?
Thanks
Antonio Fasano
Brazil
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.