Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <cstdio>
- #include <string>
- using namespace std;
- void Tworzenieplikow(int n)
- {
- fstream plik;
- for (int i = 0; i < n; i++)
- {
- string nazwa = "osoba";
- nazwa += to_string (i);
- nazwa += ".txt";
- plik.open(nazwa, ios::out || ios::app);
- plik.close();
- }
- }
- int main()
- {
- string linia;
- fstream plik;
- plik.open("plik.docx", ios::out || ios::app);
- if (plik.good() == true)
- {
- plik << endl << "witaj w pliku" << endl;
- plik.close();
- }
- Tworzenieplikow(100);
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement