create pointer to list

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cppaddict

    create pointer to list

    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


  • cppaddict

    #2
    Re: create pointer to list

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

    Thanks,
    cpp


    Comment

    Working...