title: Where does Visual Studio search for txt files when conducting file management operations?
body: <p>I know this is a noob question, but I've worked with Python before and when you wanted to simply access a .txt file for example, all you had to do was make sure the txt file was in the same directory. I have the following C++ code below but it's not finding the Numbers.txt file that I have saved on my desktop. All I have in the file is one line of numbers of type double. All I want to do is to find the average of all of the numbers in the file. The program runs fine, but it doesn't print the output correctly. After checking to see what is printing into output by just printing output[0], I've discovered that the file is not copying it's contents into the array. Could someone clear this little problem up for me or at least point me in the right direction to a good tutorial?</p>
  
  <pre><code>int main() {
      cout &lt;&lt; "Getting File Information..." &lt;&lt; endl;
      ifstream file;
      char output[100];
      //int x;
  
      file.open("Numbers.txt", ios::in);    // open file
  
      cout &lt;&lt; "Opened File Successfully ****************" &lt;&lt; endl;
      file &gt;&gt; output;              // empty file contents into output
      cout &lt;&lt; output;              // print out contents of file
      cout &lt;&lt; "Should have printed out results by now" &lt;&lt; endl;
      //file &gt;&gt; x;
  
      file.close();
  
      return 0;
  }
  </code></pre>