I want to open the last used file i have my prog save the name of it in a text file and then read the name of it but it wont open it.Please could someone ave a look and tell me whats the matter:
Code:ifstream a_file("D:\\Text LOG\\Txt_log.txt"); getline(cin,txt); a_file.close(); ifstream b_file(txt.c_str(),ios::app); getline(b_file,txtt); cout<< txtt; cout<<setfill('-')<<setw(80)<<("-")<<endl; cout<<"Please enter some text to be output to this file: "; getline(cin,x); b_file>> x; cin.get(); system ("cls"); break;



LinkBack URL
About LinkBacks


