title: C++ using a variable from an external file
body: <p>I am new to C++ but I like it so far.</p>
  
  <p>Recently I have been making better and better builds of a console application that is just like a sign in thing, however you would give the password string and the username string in the same session.</p>
  
  <p>I am trying to make it so that you open the application and checks for a certain file, and if it is not there it will create it and ask you to give it a value. I'm hoping this would make it so that I could have a user created password and username that is already set, rather than a couple of strings that already have a value but are not user created.</p>
  
  <p>My code for my best version (its not great code) also not gonna post all of it just the part where they create the pass.</p>
  
  <pre><code> #include "stdafx.h"
   #include "iostream"
   #include "string"
   #include "windows.h"
  
   using namespace std;
  
  
   int main() {
       string user;
       string pass;
       string entry;
  
       cout &lt;&lt; "Make your username\n";
       cin &gt;&gt; user;
  
       cout &lt;&lt; "Make your password\n";
       cin &gt;&gt; pass;
  
       return 0;
       }
  </code></pre>
  
  <p>There is much more to this code (about 80 lines) but I don't feel like most of that information is needed.</p>