Archived

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

billybob

VC7 and const class members

Recommended Posts

does VC7 handle const class members correctly? VC6 doesn''t, i''m pretty sure you are supposed to be able to do something like this:
class MyClass
{
   const int SomeConst = 5; // doesn''t work in vc6, but i''m almost positive you are supposed to be able to
};
 
if you are supposed to be able to, does VC7 do it right?

Share this post


Link to post
Share on other sites
quote:
Original post by daerid
Considering const members are instance-specific, they need to be initialized in the constructor.

Except, as has been said, when they are static


pan narrans | My Website | Study + Hard Work + Loud Profanity = Good Code

Share this post


Link to post
Share on other sites