M
mark
compiler g++ on linux
file.h has the following, int x=5;
and inside the main program file I can access "x" without declaring it
"extern x". Program compiles and runs fine....
also program compiles and runs fine with x declared as extern.
So is it necessary to declare x as extern if one get away without
declaring it extern ? What is the standard and good practice ?
file.h has the following, int x=5;
and inside the main program file I can access "x" without declaring it
"extern x". Program compiles and runs fine....
also program compiles and runs fine with x declared as extern.
So is it necessary to declare x as extern if one get away without
declaring it extern ? What is the standard and good practice ?