Untitled
#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ofstream file( "dane.txt", ios::out ); if (file.is_open()) { for (int i = 1; i <= 100; ++i) { file << i << ", "; //file.flush(); } } else { cout << "Dostep do pliku zostal zabroniony!" << endl; } file.close(); return 0; }
Leave a Comment