67 - Reading Custom File Structures

#include 
#include 
using namespace std;

int main()
{
    ifstream thefile("player.txt");
    int id;
    string name;
    double money;

    while(thefile >> id >> name >> money)
    {
        cout << id << "," << name << "," << money << endl;
    }
}

你可能感兴趣的:(67 - Reading Custom File Structures)