error 'char_Creator' was not declared in this scope

i keep getting that error all the time i run the following code and im not sure why:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include <windows.h>

#include <iostream>
using namespace std;

void world_Builder()
{
	char spawn[50];
	char answerOne[50];
	
	cout << "This is the world builder here you can \n"
		 << "design where you want to spawn and the \n"
		 << "vegetation and mineral occupancy of your world!\n"
		 <<endl;
		 
		 biome:
	cout << "Choose in what biome do you want to spawn in: \n"
		 << "Forest\n"
		 << "Plains\n"
		 << "Desert (hardest one) \n"
		 <<endl;
		 
		 
		 cout << "\n What biome do you start in?";
		 cin >> spawn;
		 
		 cout << "Are you sure you want to spawn in? \n" << spawn << endl;
		 cin >> answerOne;
		 
		 if (answerOne == "yes")
		 {
		 	cout << "Your spawn biome will be " << spawn << endl;
		 }
		 
		 char_Creator(); //error comes here
		 
}

void char_Creator()
{
	
	char age[50];
	
	cout << "Next you must create your character, \n"
		 << "in Sandbox mode you can decide what age and era you want to start in."
		 <<endl;
}

int main ()
{
	char name[50];
	
	cout << "Before continuing tell me your name: \n";
	cin >> name;
	system("cls");
	world_Builder();
}
put your char_Creator function above your world_Builder function.

(or use a function prototype)
Topic archived. No new replies allowed.