I have a variable defines in one .cpp file.
(file1.cpp)
int N;
....
N =3;
(directory/file2.cpp) ----> file2.cpp is in another directory.
extern int N;
cout << n << endl ; -----> It is printing 0.
It should hv printed 3..right ? What is the mistake I am doing..Please let me know. Directory Structure is:
(main Directory)
file1.cpp directory
(directory)
file2.cpp
Thanks, Avinash