title: .txt to vector <string>, non-class type error
body: <p>Hi I just started to learn C++ this week and I require some assistance. 
  Basically what I am trying to do is read from a .txt file and "convert" it into a vector string and then display it.
  my error is at this line: text.readFile("scenario.txt"), it says: "request for member 'readFile' in 'text', which is of non-class type 'Conversion()'" 
  what does that mean?
  and also my method getLines() could not be resolved. </p>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;fstream&gt;
  #include &lt;sstream&gt;
  #include &lt;vector&gt;
  #include "Conversion.h"
  
  using namespace std;
  
  int main()
  {
      vector&lt;string&gt; lines;
  
      Conversion text();
  
      if(text.readFile("scenario.txt") == true)
          lines = text.getLines();
  
      for(int i = 0; i &lt; lines.size(); ++i)
          cout &lt;&lt; lines[i] &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  
  <p>Conversion.cpp</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;sstream&gt;
  #include &lt;vector&gt;
  #include "Conversion.h"
  
  using namespace std;
  vector&lt;string&gt; lines;
  
  Conversion::Conversion(std::vector&lt;std::string&gt; lines) {
      lines.clear();
  }
  Conversion::Conversion() {
  }
  
  Conversion::~Conversion() {
  }
  
  bool Conversion::readFile(string filename) {
      ifstream file;
      string line;
  
      file.open(filename.c_str());
  
      if(!file.is_open())
          return false;
  
      while(getline(file, line))
          lines.push_back(line);
  
      return true;
  }
  
  vector&lt;string&gt; Conversion::getLines(){
      return lines;
  }
  </code></pre>
  
  <p>Conversion.h</p>
  
  <pre><code>#ifndef CONVERSION_H_
  #define CONVERSION_H_
  
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;sstream&gt;
  #include &lt;vector&gt;
  
  class Conversion {
  public:
      Conversion();
      Conversion(std::vector &lt;std::string&gt;);
      ~Conversion();
      std::vector&lt;std::string&gt; getLines();
      bool readFile(std::string);
  
  private:
      std::vector&lt;std::string&gt; lines;
      std::string line;
      std::ifstream file;
  };
  
  #endif
  </code></pre>