Hey guys! I'm new to the forums and I have a question. I'm trying to create a program that loads users information via text file and outputs them on the screen.
struct User
{
std::string name;
int age;
};
class UserInformation
{
public:
UserInformation();
~UserInformation();
void GetUserName();
void GetUserAge();
void SetUserName();
void SetUserAge();
void LoadUsers(constchar *filename);
std::vector<User> users;
protected:
private:
};
I would like to have the vector of type User, but I get the same conversion errors. I've looked online and all I found was links on how to create vectors of ifstreams. I probably could've worded my search querey better, but I thought I would ask some pros for advice.
Keep in mind that I still have to write the parsing part of the code, but I can't get past the vector invalid conversion.