Good day!
I am currently developing a notepad storage to hold the players information!
In notepad I have this data: Where data is seperated by a comma. First is the playerID, PlayerName, PlayerScore.
202, Andrie Velez, 4500
203, Joseph Josh, 3500
200, Carl J0sefana, 4000
Ive created a sample code to generate some result but its not totally working, here is my code so far:
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
char playerID[3];
ifstream Players("Players.txt");
if (Players.is_open()}
{
cout<<"Enter Player ID number: ";
cin>>playerID;
while(!Players.eof())
{
//code to compare in Players.txt base on given playerID and display the PlayerName and PlayerScore if playerID match in Players.txt
}
Players.close();
}
return 0;
}
Any help is greatly appreciated!