i have a question
i have 2 files. One is the main one which calls another file both use same structure
Do i have to declare it both files?
Printable View
i have a question
i have 2 files. One is the main one which calls another file both use same structure
Do i have to declare it both files?
It sounds like your after the extern keyword. Do a board search, 'cos I know there's been talk of this recently.
Hammer, can you explain your avatar???
You don't recognise a HAL 9000 ??!! :DQuote:
Originally posted by Magos
Hammer, can you explain your avatar???
This will explain all
The quote isn't quite right, I couldn't fit all the words in! The real one is:
"I'm sorry Dave, I'm afraid I can't do that."
Oh, hehe! No, i haven't seen that movie/read that book :). Perhaps I should, is it any good?
>movie
The movie is quite old, and is somewhat slow. It's an acquired taste, imho. But I like it!
>book
This is better, it explains a lot more than the film ever could. Worth a read I think.
Unregistered> Did you find the answer you wanted?
> Do i have to declare it both files?
Yes
The best way is to put the structure in an include (.h) file, then include that in all the .c files which need it.