I want to know, in c++, when does the initialization of objects take place?
Is it at the compile time or link time?
For ex:
//file1.cpp extern int i; int j=5; //file2.cpp ( link with file1.cpp) extern j; int i=10; Now, what does compiler do : according to me, it allocates storage for variables.
Now I want to know :
does it also put initialization value in that storage or is it done at link time?