I dont' quite understand how this function works.
I wrote a simple programming reading one line with getline().
for example:
ifstream in;
in.open("example.txt");
string line;
getline(in, line);
cout << line << endl;
When I tried to run this program I received an error message like this.
`assign1_2.cpp:33:20: error: cannot convert 'std::string {aka std::basic_string<char>}' to 'const char*' for argument '1' to 'int atoi(const char*)'
I simply don't understand what went wrong here. Please help!. I am a newbie to c++.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)