Keil Logo Arm Logo

Global variable

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Ajit Pachore
Posted
12-Aug-2004 15:23 GMT
Toolset
C51
New! Global variable
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
New! RE: Global variable
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
New! RE: Global variable
Dear Hans-Bernhard Broeker, I am very much thankful for your hint. My problem is solved. I thank you again.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.