static variable issue!
-
Hi, I have created a static variable in a vc++6.0 project, the same project has sub project workspace. The variable which was created in one workspace is not accessible in another, though all are successfully compiled. what could be the reason ? Thanks and regards, :)
Thanks a lot
-
Hi, I have created a static variable in a vc++6.0 project, the same project has sub project workspace. The variable which was created in one workspace is not accessible in another, though all are successfully compiled. what could be the reason ? Thanks and regards, :)
Thanks a lot
ganesa moorthy wrote:
what could be the reason ?
The reason is that you were absent the day they taught C++ in C++ class. That's a C++ basic beginners topic (static scope[^]) and if you have not yet learned it then I hope your project is a school project.
led mike
-
Hi, I have created a static variable in a vc++6.0 project, the same project has sub project workspace. The variable which was created in one workspace is not accessible in another, though all are successfully compiled. what could be the reason ? Thanks and regards, :)
Thanks a lot
You really have to get yourself a book about C/C++ basics.
-
ganesa moorthy wrote:
what could be the reason ?
The reason is that you were absent the day they taught C++ in C++ class. That's a C++ basic beginners topic (static scope[^]) and if you have not yet learned it then I hope your project is a school project.
led mike
try it in two different workspaces, it will work within one workspace only.
Thanks a lot
-
You really have to get yourself a book about C/C++ basics.
thanks i need to learn a lot, but do u know it is possible to retain and have values of static variable in project but across workspaces.
Thanks a lot