title: C++ using STL List, how to copy an existing list into a new list
body: <p>Right now I'm working with a copy constructor for taking a list called val of type char, and I need to take all the elements of a string v that is passed into the copy constructor and put them into the val list.</p>
  
  <pre><code>Public:
  LongInt(const string v);
  
  Private:
  list&lt;char&gt; val;
  </code></pre>
  
  <p>So here in the public section of the LongInt class I have a copy constructor which takes the val list and copies the v string into it.  Can anyone help me figure out how to do this?  Thanks in advance!</p>