I'm trying to make a User
class, however I'm getting an error output whenever I try to compile this code:
#ifndef LOGIN_H
#define LOGIN_H
#include <string>
/* Classes */
class User {
std::string username, password;
public:
void set_user_username (std::string);
void set_user_password (std::string);
};
// Sets the User's username
void User::set_user_username (std::string input) {
username = input;
}
// Sets the User's password
void User::set_user_password (std::string input) {
password = input;
}
#endif // LOGIN_H
multiple definition of `User::set_user_username(std::string)'
Any clue why it's giving me this error message?