#include <iostream> #include <fstream> #include <string> using namespace std; void readfromfile(string filenamestring) { fstream newfile; newfile.open(filenamestring,ios::in); if(newfile.is_open()) { string textline; while(getline(newfile,textline)) { cout<<textline<<"\n"; } newfile.close(); } } int main() { string filename="I:\\KREZA\\Podaci.txt"; readfromfile(filename); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)