create pointer to list

C

cppaddict

Hi,

How can you create a pointer or a reference to a list. For example:

list<int> l;
//...some code initializes the list
//now try to create a pointer or ref to it
list<int>* = l; //doesn't work
list<int>& = l; //also doesn't work

What is the correct way to do this?

Thanks,
cpp
 
C

cppaddict

Sorry, please ignore this post. The code works fine. I was confusing this
problem with another one.

Thanks,
cpp
 

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
474,145
Messages
2,570,824
Members
47,371
Latest member
Brkaa

Latest Threads

Top