Hi, I wrote part of a program in visual c++, but I use dev c++ at school, so I tried just copying my code:
char mainmenu[50];
char game[50];
int strength;
int intelligence;
int dexterity;
int health;
int mana;
int damage;
int defense;
int k;
int roll;
int experience;
int levelup;
int main () {
HANDLE hConsole;
int k;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
k = 3;
SetConsoleTextAttribute(hConsole, k);
cout <<"Main menu: New game, Load game, Exit game" <<endl;
cin.getline(mainmenu, 50);
if (mainmenu == "New" || "new" || "New Game" || "new game" || "New game" || "new Game" || "newgame" || "Newgame")
{
system("Cls");
cout <<"Hello, what may I call you by?" <<endl;
cin.getline (name, 50);
cout <<"Hello " <<name <<", and welcome to the world of Zelanthia." <<endl;
Sleep(1500);
cout <<"Our world has been horribly overrun with monsters, and we need you to help!" <<endl;
Sleep(2500);
cout <<"Here is a practice fight for you.";
Sleep(10000);
}
But I get errors saying hConsole is undefined
STD_OUTPUT_HANDLE undeclared
expected ; before hConsole
SetConsoleTextAttribute undeclared
And it goes on saying cout, cin, and everything are the same way. I have no idea what files have to be included into the project in dev-c++, as in visual they are already included, help would be great. Thanks ahead of time!