Including header files

This is some of my program. My problem is when i try and include my header file "additional.h" i get the error message:

1>c:\users\aaron\documents\visual studio 2008\projects\hw7\hw7\brain_gym.cpp(5) : error C2059: syntax error : 'namespace'

1>c:\users\aaron\documents\visual studio 2008\projects\hw7\hw7\brain_gym.cpp(5) : error C2238: unexpected token(s) preceding ';'

1>c:\users\aaron\documents\visual studio 2008\projects\hw7\hw7\brain_gym.cpp(43) : fatal error C1075: end of file found before the left brace '{' at 'c:\users\aaron\documents\visual studio 2008\projects\hw7\hw7\additional.h(6)' was matched

I don't understand how namespace is a syntax error.

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
#include <iostream>
#include <fstream>
#include "additional.h"

using namespace std;


int main()
{	memberchoice make;
	int choice=0, choice2=0;
	

	cout << "Welcome to your personal CS 1400 Brain Gym" <<endl;
	do 
	{	cout << "Here are your list of options" << endl;
		cout << "1.  Members" << endl << "2.  Faculty" << endl;
		cout << "3.  Report" << endl << "4.  About us" << endl;
		cout << "5.  Exit" << endl << "Please enter your choice now   ";
		cin >> choice;
		cout << endl;
		if (choice >5)
		{	cout << "Invalid choice please reenter choice!" << endl;
			cin >> choice;
		}
		else if (choice == 1)
		{	make.memberDisplay(choice);
		}
		else if (choice == 2)
		{	make.facutlyDisplay(choice);
		}
		else if	(choice == 3)
		{	make.report(choice);
		}
		if	(choice == 4)
		{	cout << "This is a CS 1400 Brain Gym Software Done by Aaron Garcia";
			cout << endl << endl;
		}
		cout << endl;
	}while (choice !=5);

	return 0;
}



Any advice or hints would be much appreciated.
There is very likely a syntax error at the end of your header that is, when copied into your main file, creating the error. You may have forgotten a ; at the end of a class definition or something similar.
Well due to carelessness on my part, and intelligence on your part that was the error! Thank you, its much appreciated!!
Topic archived. No new replies allowed.