• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

## Recommended Posts

MelvinElvin    122
Using MSVC++ 6, whenever i create a static variable for a class, it compiles fun but then i get a link error saying: "unresolved external symbol" followed by the name of the static i declared. If anyone can figure out what I''m doing wrong from this vague description, I''d be extremely grateful. I haven''t used statics all that much before, so it''s probably something pretty simple i''m not doing. Thanks a lot. MelvinElvin

##### Share on other sites
Grugnorr    122

You have to do this:

//.hclass CFoo{private:static int m_Foo;};//.cppint CFoo::m_Foo=0;[/CODE]

What the hells!