Strzyk

zapis

Feb 2nd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. ifstream inputFile;
  2. string nazwapliku;
  3. cout<<"Podaj nazwe pliku: ";
  4. getline(cin, nazwapliku);
  5. inputFile.open(nazwapliku.c_str());
  6. nazwapliku.erase(nazwapliku.find_last_of('.'),string::npos);
  7. nazwapliku=nazwapliku+"_nowu.csv";
  8. ofstream file(nazwapliku.c_str());
  9. if(inputFile.fail()){
  10. cerr<<"Blad otwarcia pliku"<<endl;
  11. return(1);
  12. }
Add Comment
Please, Sign In to add comment