[ notebookFun @ 11.11.2019. 15:37 ] @
Code: #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("example.txt"); if (myfile.is_open()) { while ( myfile.good() ) { getline (myfile,line); cout << line << endl; } myfile.close(); } else cout << "Unable to open file"; return 0; } Zasto na izlazu od prve linije dobijam ove cudne karaktere? TextPrveLinije Sledece linije se citaju normalno... |