missing funtion header???

i keep getting an error '{' missing function header (old style formal list?)
what does that mean?

what am i doing wrong?

#include <iostream>
#include <ctime>

using namespace std;
void DragonBite();
void DragonHorn();
void DragonTail();
void DragonBreath();

int main()
{

cout << "Please enter the number of times you want the dagon to attack you: " << count << endl;
cin >> count >> endl;
(int count = 1; count < 100; count++)
}
{
for (int count = 1; count < 31; count++)
{
DragonBite();
return 0;
}

void DragonBite();

cout << " The Dragon bites you " << endl;
}
void DragonBite();
{
for (int count = 32; count < 55; count++)
{
DragonHorn();
return 0;
}
void DragonHorn() {
cout << " The Dragon gores you with his horn! " << endl;
}
{

void DragonHorn();
}
{
for (int count = 56; count < 80; count++)
{
DragonTail();
return 0;
}
void DragonTail() {
cout << " Dragon slaps you with his tail! " << endl;
}
{

void DragonTail();
}
{
for (int count = 81; count < 100; count++)
{
DragonBreath();
return 0;
}
void DragonBreath() {
cout << " Dragon breathes fire on you! " << endl;
}
{

void DragonBreath();
}








Last edited on
this is your code automatically indented. Note how awful it looks because of your random braces
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
58
59
60
61
62
63
64
65
66
67
#include <iostream>
#include <ctime>

using namespace std;
void DragonBite();
void DragonHorn();
void DragonTail();
void DragonBreath();

int main()
{

	cout << "Please enter the number of times you want the dagon to attack you: " << count << endl;
	cin >> count >> endl;
	(int count = 1; count < 100; count++)
}
{
	for (int count = 1; count < 31; count++)
	{
		DragonBite();
		return 0;
	}

	void DragonBite();

	cout << " The Dragon bites you " << endl;
}
void DragonBite();
{
	for (int count = 32; count < 55; count++)
	{
		DragonHorn();
		return 0;
	}
	void DragonHorn() {
		cout << " The Dragon gores you with his horn! " << endl;
	}
	{

		void DragonHorn();
	}
	{
		for (int count = 56; count < 80; count++)
		{
			DragonTail();
			return 0;
		}
		void DragonTail() {
			cout << " Dragon slaps you with his tail! " << endl;
		}
		{

			void DragonTail();
		}
		{
			for (int count = 81; count < 100; count++)
			{
				DragonBreath();
				return 0;
			}
			void DragonBreath() {
				cout << " Dragon breathes fire on you! " << endl;
			}
			{

				void DragonBreath();
			}
is that what is causing all my errors?
It's not just those. And please do not try to post the same problem just because you think I came off as a dick. Again, you're going to have to learn the syntax of (and thanks to @ne555, I won't have to blind my eyes to locate the first line number where the error was glaringly obvious):

for loops - line 15
cin statements - line 14
function prototypes and defining their bodies - line 28
proper curly brace usage - line 17

Also try not to use libraries when you have no intention of using any functions or methods within that library - line 2

http://www.cplusplus.com/forum/general/174694/
Topic archived. No new replies allowed.