title: Fantasy Football - Implementing Classes Trouble
body: <p>I have continued my struggles in using classes to create a C++ Generated Fantasy Football Draft.  I feel like I have an okay understanding of classes, but am having trouble implementing them in this case.  I would like to upload the code I have written, and I have some specific comments in the code about implementing the "team" class and "player" class mainly.</p>
  
  <p>Any and all help appreciated
  Also, if I did not upload this correctly, please let me know.</p>
  
  <pre><code>    // main.cpp - Where the winners are crowned
  // Written by Mike Green
  
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  void add_name_at_end();
  void traverse();
  
  
  // Declaration of name, and the -&gt; next pointer
  struct Names
  {
      string name;
      string name2;
      struct Names *next;
  
  };
  Names *start_ptr = NULL;
  int option = 0;
  
  
  // ---------------------------Adding of players to Draft-----------------------------
  void add_name_at_end()
  {
      // Temporary pointers
      Names *temp, *temp2;
  
      // Reserve space for a new node
      temp = new Names;
      cout &lt;&lt; "Please enter YOUR chosen team name:";
      cin &gt;&gt; temp-&gt;name;
  
  
      temp-&gt;next = NULL;
  
  
      // Sets the pointer from this node to the next NULL
      // If list empty at beginning just set start pointer to this node
      if (start_ptr == NULL)
          start_ptr = temp;
      else
      {
          temp2 = start_ptr;
          while (temp2-&gt;next != NULL)
          {
              temp2 = temp2-&gt;next;
          }
  
              temp2-&gt;next = temp;
      }
  
  }
  
  // --------------------------Traversing the List------------------------------
  void traverse()
  {
  Names *temp;
  temp = start_ptr;
  
  do
  {
  if(temp == NULL)
  cout &lt;&lt; "These are the teams: " &lt;&lt; endl;
  else
  {
      cout &lt;&lt; "Team Name: " &lt;&lt; temp-&gt;name &lt;&lt; endl;
      temp = temp-&gt;next;
  
      }
  }while (temp != NULL);
  }
  
  // -------------------------Team Class----------------------------
  class team
  {
      // -------------String "Name" or "Names" here?----------------
      //---------------How to recall what they enter as their team name? Or how does this work?----------------
      //---------------Really stuck here..------------------
      string Name;
      int points;
      team *myPlayers;
      int insert;
  
  };
  
  
  //------------------------Players Class-------------------------
  class players
  {
      // ------------Used to store the list of players that are draftable---------------
      //----------------Read in a file, Or create an array?
      string Name;
      int points;
      bool taken;
  
  };
  
  
  
  //-----------------Main---------------------------
  int main()
  {
      start_ptr = NULL;
      cout &lt;&lt; "Welcome to Fantasy Football" &lt;&lt; endl;
  
  
      //int numberofPlayers;
      //cout &lt;&lt; "How many players will be playing today? (1-8)";
      //cin &gt;&gt; numberofPlayers;
      //cout &lt;&lt; "There will be " &lt;&lt; numberofPlayers &lt;&lt; " players playing today." &lt;&lt; endl;
  
      //if (numberofPlayers &lt; 0 || numberofPlayers &gt; 8)
      //  cout &lt;&lt; "You did not enter a number between 1 and 8" &lt;&lt; endl;
  
      do
      {
          cout &lt;&lt; endl;
          cout &lt;&lt; "What would you like to do? " &lt;&lt; endl;
          cout &lt;&lt; "1 - Insert Another Player For The Draft" &lt;&lt; endl;
          cout &lt;&lt; "2 - Finished Adding Players " &lt;&lt; endl;
          cout &lt;&lt; endl &lt;&lt; " &gt;&gt; ";
          cin &gt;&gt; option;
  
          switch(option)
          {
          case 1: add_name_at_end();
              break;
          case 2: break;
          }
  
      }while (option != 2);
  
      if (option == 2)
      {
          cout &lt;&lt; "These are the teams that will be drafting " &lt;&lt; endl;
          traverse();
      }
  
  
      // ------------------This Loop does not work--------------
      // - Can't use team because it is a class?
      // - Name is unidentified?
      // - Still need to write the insert function.. But Where??
      for (int i = 1 || 2 || 3 || 4; i &lt; 5; i++)
      {
          cout &lt;&lt; team[i] &lt;&lt; "chooses: " &lt;&lt; endl;
          cin &gt;&gt; Name;
          team[i].insert(Name);
      }
  
      system ("pause");
  }
  </code></pre>