title: C++ Program with pointers not working
body: <p>I am a beginner and am stuck. I have written this and so far it is not working. After "Add or Remove Trader" it does nothing. Any help or tidbits on how to make this functional would be greatly appreciated. Thank you. </p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;iomanip&gt;
  #include&lt;string&gt;
  using namespace std;
  
  struct Department{
  string deptName;
  int numTraders;     
  };
  
  void addTraders(Department *, int );
  void removeTraders(Department *, int);
  
  int main(){
  
  char addOrRemove;
  Department departments[10] = {
      {"Bank Loan", 10},
      {"Conservative Allocation", 9},
      {"Europe Stock", 10},
      {"Domestic", 21},
      {"Asia", 10},
      {"Large Growth", 5},
      {"Long-term Bond", 5},
      {"Money Market", 25},
      {"Emerging Market", 18},
      {"Large Blend", 12}
  };
  
  int choice, numberToAdd, numberToRemove;
  
  Department* p_departments = departments;
  
  for(int i = 0; i &lt; 10; i++){
      cout &lt;&lt; "Department # " &lt;&lt; (i + 1) &lt;&lt; ", Name: " &lt;&lt; p_departments[i].deptName &lt;&lt;
          ", Traders: " &lt;&lt; p_departments[i].numTraders &lt;&lt; endl;
  }
  cout &lt;&lt; endl;
  
  do{
  
  cout &lt;&lt; "Enter 0 to quit, or choose a department number: ";
  cin &gt;&gt; choice;
  
  cout &lt;&lt; "Add or remove traders (A or R) ? ";
  cin &gt;&gt; addOrRemove;
  
  if(addOrRemove == 'A' || 'a'){
      cout &lt;&lt; "how many traders to add" &lt;&lt; endl;
      cin &gt;&gt; numberToAdd;
      addTraders(&amp;departments[choice-1] ,numberToAdd);
  }
  else if(addOrRemove == 'R' || 'r'){
      cout &lt;&lt; "how many traders to remove" &lt;&lt; endl;
      cin &gt;&gt; numberToRemove;
      removeTraders(&amp;departments[choice-1],numberToRemove);
  }
  else{
      cout &lt;&lt; addOrRemove &lt;&lt; " is not a valid selection. \n";
  }
  
  for(int i = 0; i &lt; 10; i++){
      cout &lt;&lt; "Department # " &lt;&lt; (i + 1) &lt;&lt; ", Name: " &lt;&lt; p_departments[i].deptName &lt;&lt;
          ", Traders: " &lt;&lt; p_departments[i].numTraders &lt;&lt; endl;
  }
  cout &lt;&lt; endl;
  
  }while(count != 0);
  
  system("pause");
  return 0;
  }
  
  void addTraders(Department *dept, int numAdd){
  
  dept-&gt;numTraders += numAdd;
  }
  
  void removeTraders(Department *dept, int numRemove){
  
  dept-&gt;numTraders += numRemove;
  } 
  </code></pre>