Click here to Skip to main content
15,910,603 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CListBox question Pin
wb17-Jul-03 11:06
wb17-Jul-03 11:06 
GeneralRe: CListBox question Pin
Shay Harel18-Jul-03 5:34
Shay Harel18-Jul-03 5:34 
GeneralRe: CListBox question Pin
wb19-Jul-03 21:08
wb19-Jul-03 21:08 
Generalextern trouble Pin
act_x17-Jul-03 9:55
act_x17-Jul-03 9:55 
GeneralRe: extern trouble Pin
Peter Weyzen17-Jul-03 10:02
Peter Weyzen17-Jul-03 10:02 
GeneralRe: extern trouble Pin
act_x17-Jul-03 10:18
act_x17-Jul-03 10:18 
GeneralRe: extern trouble Pin
Peter Weyzen17-Jul-03 12:37
Peter Weyzen17-Jul-03 12:37 
GeneralRe: extern trouble Pin
Peter Weyzen17-Jul-03 12:42
Peter Weyzen17-Jul-03 12:42 
Does B.CPP include A.H?

I would assume that it does. You probably don't need to "extern" anything. You need to declare storage for the static (shared) var.

I bet your problem is this:


-----
A.H
-----
class A
{
public:
static int X;
};

-----
A.CPP
-----
int A::X; // <- I bet you don't have one of these to formally declare memory for the static var?


-----
B.CPP
-----
#incude "a.h"

int function()
{
printf( "X=%d", A::X );
}


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>

GeneralRe: extern trouble Pin
actx_anonymous17-Jul-03 12:55
sussactx_anonymous17-Jul-03 12:55 
GeneralRe: extern trouble Pin
wb17-Jul-03 11:18
wb17-Jul-03 11:18 
GeneralRe: extern trouble Pin
Joan M18-Jul-03 0:37
professionalJoan M18-Jul-03 0:37 
GeneralMixing STLPORT and MS STL Pin
Dale Russell17-Jul-03 9:40
Dale Russell17-Jul-03 9:40 
GeneralRe: Mixing STLPORT and MS STL Pin
John M. Drescher17-Jul-03 9:54
John M. Drescher17-Jul-03 9:54 
GeneralGINA in XP and Win2003 Pin
Alex200317-Jul-03 7:57
Alex200317-Jul-03 7:57 
QuestionHow to tell if the connected USB device is a Digital Camera or Removable Drive? Pin
Member 30919817-Jul-03 7:53
Member 30919817-Jul-03 7:53 
QuestionHow VC++ program running on multiple PCs Pin
aurorahe17-Jul-03 7:40
aurorahe17-Jul-03 7:40 
AnswerRe: How VC++ program running on multiple PCs Pin
Mike Nordell17-Jul-03 8:46
Mike Nordell17-Jul-03 8:46 
GeneralRe: How VC++ program running on multiple PCs Pin
aurorahe17-Jul-03 9:41
aurorahe17-Jul-03 9:41 
AnswerRe: How VC++ program running on multiple PCs Pin
wb17-Jul-03 11:32
wb17-Jul-03 11:32 
GeneralRe: How VC++ program running on multiple PCs Pin
Neville Franks17-Jul-03 11:49
Neville Franks17-Jul-03 11:49 
AnswerRe: How VC++ program running on multiple PCs Pin
Neville Franks17-Jul-03 11:51
Neville Franks17-Jul-03 11:51 
AnswerRe: How VC++ program running on multiple PCs Pin
Garth J Lancaster17-Jul-03 15:27
professionalGarth J Lancaster17-Jul-03 15:27 
GeneralRe: How VC++ program running on multiple PCs Pin
Anthony_Yio18-Jul-03 0:54
Anthony_Yio18-Jul-03 0:54 
GeneralRe: How VC++ program running on multiple PCs Pin
Garth J Lancaster18-Jul-03 12:53
professionalGarth J Lancaster18-Jul-03 12:53 
GeneralPrinting in VC++ IDE Pin
john john mackey17-Jul-03 7:33
john john mackey17-Jul-03 7:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.