Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <iostream>
- #include <fstream>
- using namespace std;
- int writeFile (string data)
- {
- ofstream myfile;
- myfile.open("test.txt");
- myfile << "TWOJE IMIĘ I NAZWISKO TO: " << data;
- myfile.close();
- return 0;
- }
- int main()
- {
- string a, b;
- cout<< "Podaj imie" << endl;
- cin >> a;
- cout << "Nazwisko" << endl;
- cin >> b;
- cout << a + b;
- writeFile(a + " " + b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement