title: Can i construct a linked list with curly braces?
body: <p>I am fairly new to object oriented C++, and I'm trying to make a constructor for a linked list in this way:</p>
  
  <p>Somewhere in the List.h we'd have this: </p>
  
  <pre><code>struct Node
  {   
      int data;
      Node *next;
  }; 
  </code></pre>
  
  <p>and then in the main.cpp, I'd like to be able to construct a list like this: </p>
  
  <pre><code>int main()
  {
  List A({1,2,3,4,5,6});// I want the amount of numbers to indicate the size of
   //the list and the numbers to go into each node in order
  return 0;    
  }
  </code></pre>
  
  <p>So my question is, can i make such a constructor? If so then how? Do i have to use templates do this? I tried to find a question like this answered in SO but they all included templates and i haven't learned that yet. If i can make my constructor to do this, is it possible to do it without using templates?</p>