On Jan 5, 3:20 pm, Ian Collins <ian-n...@hotmail.comwrote:
Rahul wrote:
Hi Everyone,
I was wondering if references to a function defined in another file
is resolved at linker time, why isn't the same extended for global
variables? I mean, without the extern keyword being used... does the
standard say that reference to global variables have to be resolved at
compile time?
Declaring a variable extern is what makes it a global.
--
Ian Collins.
Sorry wanted to post in comp.lang.c where compiler assumes that a
undeclared function would return an int and would be defined in some
other compilation unit... c++ makes sure that a prototype is very much
necessary for a function call...