Here is my code:
...
#include "myheader.h"
myClass::myStruct Foo;
Foo.one = 1;
Foo.two = 2;
myClass myclass(Foo);
...
This is my class from the header file:
class myClass : baseClass{
public:
struct myStruct {
myStruct():
one(0),
two(0){}
int one;
int two;
};
myClass(const myStruct &mystruct);
};
But this is failing to compile, I think I am accessing the elements one and two in the proper way... I get this error:
: expected constructor, destructor, or type conversion before '.' token .
Where a m I going wrong?