Hello all
I have a serious problem. I have constuct the Rl struct with containers and strings.
I whant to make a new constructor with holding Rl pointers, not Rl objects that i already did.
Using code i have error. Any idea?
1 2 3 4 5 6 7 8
typedef vector <Rl> *RLs;
....
RLs monv;
wchar_t * a1=L"a hell please ..."; // ok
Rl *a1= new Rl(a1); // ok
monv.push_back(&a1); // error
or ...
monv.push_back(a1); // error
request for member `push_back' in `monv', which is of non-class type `std::vector<Rl, std::allocator<Rl> >*'
typedef vector<rR> rRl; // rR container
struct rR
{
rR(wstring);
rR();
wstring astring;
};
struct Rl
{
rRl r;
wstring l;
Rl(wstring aString){
r.push_back(rR(aString)) ;
l= aString;
}
};
now i whant a container of points in struct Rl.
I am truing
typedef vector <Rl> *RLs;
RLs aR;
wchar_t*a1=L"i am try to do this ...";
Rl *a2= new Rl(a1);
aR->push_back(a2); // here is the error
If i try with no pointers, but objects all are ok...
Any idea?