|
-
January 26th, 2005, 06:06 AM
#6
Re: Is this normally allowed in C++ or is it an MS language extension.
 Originally Posted by Sahir
You see a lot of this in MSDN. In some situations if you dont initialize a VARIANT in this manner (i.e. VARIANT v = {0}; ). Things don't work as you expect them to.
Well, that's obvious: VARIANT is a struct, so you can initialize the members of a VARIANT instance with an initializer list. The same can be done with the public members of a class, it's pretty much standard C++. However, the code sample you provided used a class without any members, that's why the comeau compiler complained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|