Vectors

Andrew Sutton asutton at cs.kent.edu
Tue Mar 15 17:33:26 GMT 2005


Muhammad Rizwan wrote:

>Hello
>
>First this is not kdevelop issue in any way but its related to C++ and
>its for the gurus of C++, so please don't mind of this question.
>
>I am making data structures in c++ by using combination of vectors and
>structs. I have defined this in TrackManager.h:
>
>   typedef struct SM
>   {
>	string SubMethodName;
>	vector<string> SubMethodNameArg;
>   }SMethod;
>
>   vector<SMethod> SubMethodInfo;
>  
>

i couldn't say exactly why the compiler is complaining - maybe you're 
missing the include file or something, but the better question is why 
you're declaring you structure this way. this is C++, you don't need to 
typedef like that. it should be written:

struct SMethod
{
    string SubMethodName;
    vector<string> SubmethodNameArg;
};

vector<SMethod> SubmethodInfo;

that alone might account for the compile error.

andrew sutton
asutton at cs.kent.edu

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list