c++ - Seg fault with getline function() Multi 5 compiler -


iam using multi 5 compiler , getting error tried access restricted memory getline function. please suggest issue.

anyfunction (std::string filepath) {     std:string linear = "";     ifstream in;     in.open(filepath);     if(in.is_open())     {         while (getline(in,linear))  // <- error here seg fault         {              do_someting();         }     }     in.close }  int main() {     std::string filepath = "\hello\asd.xml";     anotherfunction(filepath);     anyfunction(filepath); //working of both function similar or both use     getline } 


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -