can anyone please show me an example?

How do you attach a pointer to an int?

int i;
int *p = &i;

Right? Well, pointers are very regular, and you'll find that the same syntax works almost across the board:

vector<int> v;
vector<int> *p = &v;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.