I am a newbie in C++. I am doing a C++ sign up form where I keep all the user datas in a text file named user.txt with formats like
name|password|address|postal|phone
Each user record will occupy one line.
So my first question how can I do this nicely in C++
As for the reading part, my main problem is how to separate the data by splitting "|" then put the records in a user array. So when I do a login function I can loop through the array to match users.
My current code for reading is
string User::readUser(){
    ifstream fin("user.txt");
    string line;
    while(getline(line,fin)){
        string name, password, address; int postal, phone;//put the records into a 2 dimention array
    }
    //return array
}
 
     
     
     
     
    