May 9th, 2013, 07:09 PM
C++ extern question
I created a file access class for simple debug stuff that's not needed to run thru the document's serialize. I want to be able to call it from anywhere or any class, so I figured I can just put it global in the app's header file right under the theApp object. I used VC 6 in the past and I don't remember seeing the extern in front of the theApp object. Now I'm using VC 2005 and the project created the app object with extern.
I assume I should create my class object with extern also ?
What is the difference in a global object with or without extern ?
----In my app's header file--
extern CViewSwitchApp theApp;
extern MyFileClass FileClass;
Last edited by J_W; May 9th, 2013 at 07:10 PM.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!