problem splitting a string
<p>Can some one please tell me the problem with this code. I am reading each line using <code>getline</code> function and again using the same function for splitting the string for <code>:</code> delimiter.</p>

<pre><code> string line,item;
 ifstream myfile("hello.txt");

 if(myfile.is_open()) {
   string delim =":";
   while(!myfile.eof()) {
     vector&lt;string&gt; tokens;
     getline(myfile,line);
     stringstream iss(line);

     while(getline(iss,item,delim)) {
       tokens.push_back(item);
    }
  }

  myfile.close();
}
</code></pre>

<p>The error message is:</p>

<pre><code>C2780: 'std::basic_istream&lt;_Elem,_Traits&gt; &amp;std::getline(std::basic_istream&lt;_Elem,_Traits&gt; &amp;,std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;)' : expects 2 arguments - 3 provided 1&gt; c:\program files\microsoft visual studio 8\vc\include\string(528) : see declaration of 'std::getline' 
</code></pre>
