Alright i keep getting 2 errors:
Error 1 error LNK2005: _main already defined in main.obj
Error 2 error LNK1169: one or more multiply defined symbols found
#include<iostream>
#include <string>
#include <random>
#include <time.h>
using namespace std;
class Player
{
public:
string mFirstName;
string mLastName;
string mStreetName;
string mGender;
int mAdress;
int mAge;
};
Player GetPlayerFromConsole()
{
Player npc;
cout << " New Player Signup: " << endl;
cout << "Enter your first name: " << endl;
cin >> npc.mFirstName;
cout << "Enter your last name: " << endl;
cin >> npc.mLastName;
cout << " Enter your Age: " << endl;
cin >> npc.mAge;
cout << "Enter your Gender: " << endl;
cin >> npc.mGender;
cout << "Enter your Street name: " << endl;
cin >> npc.mStreetName;
cout << "Enter your adress: " << endl;
cin >> npc.mAdress;
return npc;
}
int main()
{
Player newPlayer;
newPlayer = GetPlayerFromConsole();
cout << "New Player info Sheet: " << endl;
cout << "Player name: " << newPlayer.mFirstName << endl;
cout << newPlayer.mFirstName << endl;
cout << "Player Adress: " << newPlayer.mAdress << newPlayer.mStreetName << endl;
cout << "Player Gender: " << newPlayer.mGender << endl;
cin.get();
system("pause");
return 0;
}