//Writing Custom File Structures
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ofstream Traits("Players.txt");
cout << "ENTER PLAYER ID, NAME, MONEY\n";
cout << "press CTRL+Z to quit\n";
int idNumber;
string name;
double money;
while(cin >> idNumber >> name >> money){
Traits << idNumber << " " << name << " " << " " << money << endl;
}
}
in this code i coudnt quite understand the while loop
while(cin >> idNumber >> name >> money){
Traits << idNumber << " " << name << " " << " " << money << endl;
can someone please explain this....
Last edited on
what does the while loop mean?
why would it stop or keep going on?
I'm sure even the most rudimentary of C++ tutorial sources will explain what a while loop is and how they work.