For a HW I have to write a program that simulates a website login. I am already provided with a file that has 10 users already each with their own
userID: a string (no blanks permitted)
password: a string (no blanks permitted)
PIN: an integer (4 digits)
and the file reads it as
1 2 3 4 5 6 7
struct UserRecord
{
string userID;
string password;
int PIN;
};
the strings for both the user ID and password cannot contain blanks either
so how do I set it up as an array to hold 50 and then read in the number of users and then read the user data into your array of structs and then after it Echoprints all input and Print user data in table format. ? (I really need help here)
I would recommend a vector, but if you have to use an array you would do it similar to this (it is ugly, but getting dinner ready so threw this together fast):