dereferencing problem

G

Gary Wessle

Hi

how can I dereference the object as showing below?

mytype{
vector<double> names;
public:
mytype(){}
};

class arrangem{
public:
arrangem(vector<mytype*>){...}


how can I find out here about the size of
vector<double> names for say typ1

};

int main() {
mytype typ1, typ2;

vector<mytype*> collection;
collection.push_back(&typ1);
collection.push_back(&typ2);

arrangem job1(collection);
}

thanks
 
M

Milind

Hello,

IMHO, the same way you you extract variable count here.

class A {
int count;
public:
inline int GetCount() { return count; }
};

class B {
A a;
};

class C {
B b;
};

int main () {
C c; // how do you extract count here??? May be a get method, friend
class something!!
}

HTH
~Mo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top