Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
/*User class is a class that represents the player and will contain info
marking progress, name and current settings for the game.
*/
class user{
private:
char* name;
char* lang;
char* term;
float timeplayed;
float money;
public:
//Creates user, can be used to check if user was previously created.
user(){
const char* name = std::getenv("USER");
const char* lang = std::getenv("LANGUAGE");
const char* term = std::getenv("TERM");
float timeplayed = 0.0 ;
float money = 0.0;
};
~user(){
std::cout << "User object has been destroyed" << std::endl ;
}
char* getName() {return name;}
char* getLang() {return lang;}
char* getTerm() {return term;}
float gettimePlayed() {return timeplayed;}
};