title: Reading specific values from file c++
body: <p>I need some help with getting a code for c++,</p>
  
  <p>The situation is that, i need to read a text file which contains something like:</p>
  
  <pre><code>//THIS LINE IS COMMENTED OUT
  //THIS LINE TOO
  Variable1 = "1"; //comment for this line
  Address = "some text value here"; //comment for this line
  </code></pre>
  
  <p>So now i want to read this text file using c++ and retrieve the values as:</p>
  
  <pre><code>Variable1 = 1
  Address = some text value here
  </code></pre>
  
  <p>So how do i get this done, please need your expert help.
  I only managed to skip the commented lines of the text file using the code below, but dont now how to read the variables. I am new to c++</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int main () {
  string line;
  ifstream myfile ("text.txt");
  if (myfile.is_open())
  {
    while ( myfile.good() )
    {
      getline (myfile,line);
      if(line[0]=='/')
        continue;
  
      cout &lt;&lt; line &lt;&lt; endl;
    }
    myfile.close();
  }
  
  else cout &lt;&lt; "Unable to open file";
  
  return 0;
  }
  </code></pre>