structures, inheritance and definition

Posted by Meloun on Stack Overflow See other posts from Stack Overflow or by Meloun
Published on 2010-05-26T08:57:52Z Indexed on 2010/05/26 9:01 UTC
Read the original article Hit count: 280

Filed under:
|
|
|

Hi, i need to help with structures, inheritance and definition.

//define struct
struct tStruct1{
    int a;
};

//definition
tStruct1 struct1{1};

and inheritance

struct tStruct2:tStruct1{
    int b;
};

How can I define it in declaration line?

tStruct2 struct2{ ????? };

One more question, how can i use inheritance for structures defined with typedef struct?

© Stack Overflow or respective owner

Related posts about c++

Related posts about inheritance