Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- ofstream file1("players.txt");
- cout << "Enter players ID, name and money." << endl;
- cout << "Press ctrl+z to quit!" << endl;
- int id;
- string name;
- double money;
- while(cin >> id >> name >> money)
- {
- file1 << id << ' ' << name << ' ' << money << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement