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?
VC7 and const class members
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:
Sure does.
Edit: But only when they are static const
[edited by - Dean Harding on March 6, 2003 5:56:33 AM]
Edit: But only when they are static const
If I had my way, I'd have all of you shot!
codeka.com - Just click it.[edited by - Dean Harding on March 6, 2003 5:56:33 AM]
Considering const members are instance-specific, they need to be initialized in the constructor.
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement