title: String is not printing without new line character in C++
body: <p>I'm opening a file, and getting lines from it.
  The first line should say how many variables there are, and what their names are.
  The second line should be a logic equation using these variables.
  The assignment is to have it print out a truth table for the variables and equation.</p>
  
  <p>The first line the program is taking in is not printing without me inserting a new line character. I tried converting to a string and using both printf and cout.</p>
  
  <p>Main file that inputs everything:</p>
  
  <pre><code>#include "truthTable2.h"
  
  int main(int argc, const char* argv[]){
    ifstream inFile;
    if(argc != 2){
      cout &lt;&lt; "Enter an input file name: ";
      char *inFileName = "";
      cin &gt;&gt; inFileName;
      inFile.open(inFileName);
    }
    else
      inFile.open(argv[1]);
    TruthTable tTable;
    while(!inFile.eof()){
      char variableLine[256];
      inFile.getline(variableLine, 256);
      printf("%s ", variableLine);
      string variable(variableLine);
      tTable.setVariables(variable);
      char formulaLine[256];
      inFile.getline(formulaLine, 256);
      cout &lt;&lt; formulaLine &lt;&lt; "\n";
      string formula(formulaLine);
      tTable.setFormula(formula);
      tTable.printTable();
    }
    inFile.close();
    return 0;
  }
  </code></pre>
  
  <p>Sample input:</p>
  
  <pre><code>2 x y
  ( \wedge x ( \not y ) )
  </code></pre>
  
  <p>Output from this:</p>
  
  <pre><code> ( \wedge x ( \not y ) )
  </code></pre>
  
  <p>I think whatever is causing this is giving me problems throughout the rest of the program as well. After I tokenize the variableLine it does not print without a new line character and it does not find the second variable when evaluating the formula.</p>