Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Forward declaration and use in the same statement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nodet
New Member

8 Posts

Posted - Feb 27 2008 :  09:16:51 AM  Show Profile  Reply with Quote
Hi,

The following seems to me a perfectly valid code, but VA 10.4.1618 under MSVC 8 does not seem to agree, and underscores the 'Y' (the class name) as an unrecognized symbol:

class X {
class Y* y;
};

Was that already known?

Thanks.

Xavier Nodet
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin, 1759.

feline
Whole Tomato Software

United Kingdom
18942 Posts

Posted - Feb 28 2008 :  1:07:10 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=13677

I was not aware you could do that, but it compiles quite happily. For now I would suggest separating out the forward declaration. Personally I think that makes the code easier to follow, but that is also what I am used to seeing

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000