title: how to get background color back to previous color after use of std handle
body: <p>I'm using Visual Studio for C++ and we're writing our first code, however I've run into a 'simple' problem.</p>
  
  <p>In the code, I'm using each section as a function in itself, so for the output screen where it says "hit enter", it's calling a function to show that on the screen. However, in the farewell, I changed the system color so that the background would be white and the text black, but the "Hit enter" function still needs to be displayed. It does, but since it uses it's own colors, there's now a line of color where "\t" is in the cout.</p>
  
  <p>How do I get it where it won't do this?</p>
  
  <pre><code>    #include &lt;iostream&gt;             //Necessary for input/output
      #include &lt;string&gt;               //Necessary for constants
      #include &lt;Windows.h&gt;            //Necessary for colored text
  
      using namespace std;
  </code></pre>
  
  <p>Uh... I've never done this before... but I'll just post the sections seperately.</p>
  
  <pre><code>    system("cls");
  
  system("color F0");
  
  cout &lt;&lt; "\n\n\n\n\n\n\n\t\tIt was a pleasure spending time with you, "
      "User"
      "!\n\n\n";
  
  cout &lt;&lt; "\t\t\t\350";
  for (int i = 0; i &lt; 31; i++){ cout &lt;&lt; "\360"; }
  cout &lt;&lt; "\350\n";
  cout &lt;&lt; "\t\t\t\272";
  SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 15); //light grey
  cout &lt;&lt; "     \311\315\273\332\304\277\332\304\277\332\302\277\332\277 \302 \302\332\304\277     ";
  SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 240); //Black text white bg
  cout &lt;&lt; "\272\n"
      "\t\t\t\272";
  SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 15); //light grey
  cout &lt;&lt; "     \272 \313\263 \263\263 \263 \263\263\303\301\277\300\302\331\303\264      ";
  SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 240); //Black text white bg
  cout &lt;&lt; "\272\n"
      "\t\t\t\272";
  SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 15); //light grey
  cout &lt;&lt; "     \310\315\274\300\304\331\300\304\331\304\301\331\300\304\331 \301 \300\304\331     ";
  SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 240); //Black text white bg
  cout &lt;&lt; "\272\n";
  cout &lt;&lt; "\t\t\t\350";
  for (int i = 0; i &lt; 31; i++){ cout &lt;&lt; "\360"; }
  cout &lt;&lt; "\350\n";
  </code></pre>
  
  <p>And for the Hit enter function</p>
  
  <pre><code>        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 7); //light grey
  cout &lt;&lt; "\n\n\n\t\t\t\332";
  for (int i = 0; i &lt; 28; i++){ cout &lt;&lt; "\304"; }
  cout &lt;&lt; "\277\n\t\t\t\263 ";
  SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 12); // Red
  cout &lt;&lt; "\3 ";
  SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 71); //light grey text with red BG
  cout &lt;&lt; "Please press the Enter";
  SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 12); // Red
  cout &lt;&lt; " \3 ";
  SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 7); //light grey
  cout &lt;&lt; "\263\n\t\t\t\324";
  for (int i = 0; i &lt; 28; i++){ cout &lt;&lt; "\315"; }
  cout &lt;&lt; "\276";
  </code></pre>
  
  <p>The "Light grey" area colors the tabs too.... what do I do. Sorry if this is all terrible. New at this.</p>