Mam taki proglem, że gdy prubuje skompilować program to mam taki błąd: )\GRAcpp\main.cpp|49|error: 'gra00' was not declared in this scope|
A oto kod:
#include <iostream>
#include <stdio.h>
#include <cstdlib>
#include <conio.h>
using namespace std;
string name, bron, eq1, eq2, eq3, eq4, eq5, eq6;
int lvl, jedzenie, atak, zycie, hajs, x, y;
char aa0;
/*
name - imie gracza (uzywane w trakcie gry)
bron - nazwa posiadanej broni
*/
//menu start
void menu()
{
while(true)
{
system("cls");
cout << endl;
cout << " [N] Nowa gra" << endl;
cout << " [W] Wiecej" << endl;
cout << " [Z] Zakoncz" << endl;
aa0=getch();
switch(aa0)
{
case'n':
case'N':
{
gra00();
}
break;
case'w':
case'W':
{
}
break;
case'z':
case'Z':
{
}
break;
}
}
}
void gra00()
{
while(true)
{
system("cls");
cout << endl;
cout << " Podaj swoje imie. Bedzie ono uzywane podczas gry." << endl;
cout << " "; cin >> name;
}
}
int main()
{
menu();
getch();
return 0;
}