In my project I am using four source code files. There is one variable, which is used in all four files. When I declared this variable in one file and compiled the file, the compilation was successful. But when I tried to compile the second file, the compiler could not find this variable. Please guide me how to decare this variable so that it can be used in all four files and truly it will be global.
Read-Only
Author Hans-Bernhard Broeker
Posted 12-Aug-2004 15:43 GMT
Toolset C51
RE: Global variable
Hans-Bernhard Broeker
Get your C textbook, look up 'extern' and 'declaration' in the index. Read, understand, and do it. If this doesn't help you, you need a better textbook.
And BTW: This question has nothing in particular to do with C51, so it's quite off-topic here...
Read-Only
Author Ajit Pachore
Posted 12-Aug-2004 16:50 GMT
Toolset C51
RE: Global variable
Ajit Pachore
Dear Hans-Bernhard Broeker, I am very much thankful for your hint. My problem is solved. I thank you again.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.