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
 VA doesn't recognize the typedefs correctly
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

damrit
Starting Member

USA
1 Posts

Posted - Aug 07 2006 :  3:51:04 PM  Show Profile  Reply with Quote
VA doesn't recognize the following correctly:
struct
{
int i;
} MyFirstStruct;

typedef struct : public MyFirstStruct
{
int j;
} MySecondStruct;

The all occurances of MySecondStuct have the red underline and it is not colored (indicating that it is not recognized). However, the following make it work:

typedef struct MySecondStruct : public MyFirstStruct
{
int j;
} MySecondStruct;

jpizzi
Tomato Guru

USA
642 Posts

Posted - Aug 08 2006 :  12:20:27 AM  Show Profile  Reply with Quote
I would suggest not mixing C and C++ syntax. You are bound to get very confused.

C++ syntax for what you are trying is:


struct MyFirstStruct
{
    int i;
};

struct MySecondStruct : public MyFirstStruct
{
    int j;
};

I suspect that VA will have no problem with this syntax. I would be surprised that mixing the syntaxes as you have in your example works, but then again we are talking about the liberal Microsoft compiler, here.

Joe Pizzi
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