prog.cpp: In function ‘int main()’:
prog.cpp:3:9: error: ‘ifstream’ is not a member of ‘std’
std::ifstream file( "data.txt" ) ;
^
prog.cpp:3:23: error: expected ‘;’ before ‘file’
std::ifstream file( "data.txt" ) ;
^
prog.cpp:4:9: error: ‘string’ is not a member of ‘std’
std::string search_str = "Man" ;
^
prog.cpp:4:21: error: expected ‘;’ before ‘search_str’
std::string search_str = "Man" ;
^
prog.cpp:5:9: error: ‘string’ is not a member of ‘std’
std::string line_1 ;
^
prog.cpp:5:21: error: expected ‘;’ before ‘line_1’
std::string line_1 ;
^
prog.cpp:6:9: error: ‘string’ is not a member of ‘std’
std::string line_2;
^
prog.cpp:6:21: error: expected ‘;’ before ‘line_2’
std::string line_2;
^
prog.cpp:8:16: error: ‘getline’ is not a member of ‘std’
while( std::getline( file, line_1 ) )
^
prog.cpp:8:30: error: ‘file’ was not declared in this scope
while( std::getline( file, line_1 ) )
^
prog.cpp:8:36: error: ‘line_1’ was not declared in this scope
while( std::getline( file, line_1 ) )
^
prog.cpp:12:29: error: ‘search_str’ was not declared in this scope
if( line_1.find(search_str) != std::string::npos )
^
prog.cpp:12:49: error: ‘std::string’ has not been declared
if( line_1.find(search_str) != std::string::npos )
^
prog.cpp:14:17: error: ‘cout’ is not a member of ‘std’
std::cout<<line_1<<'\n';
^
prog.cpp:15:17: error: ‘getline’ is not a member of ‘std’
std::getline(file,line_2);
^
prog.cpp:15:35: error: ‘line_2’ was not declared in this scope
std::getline(file,line_2);
^
prog.cpp:16:17: error: ‘cout’ is not a member of ‘std’
std::cout<<line_2<<'\n';
^