How to declare A Namespace In a Class?

Hello, here is my class. How can I declare these namespaces? I have tried several things and none of them work. Thanks for any help!

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
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <cstring>
#include <iomanip>
using namespace std;



	

class ZooClass
{
public:
	int compute_total_food();
	int total_food_by_type(int type);
	int count_animals_by_type(int type);
	int hungriest_animal();
	void load_animals(string filename);

	
	using namespace san_diego;
	{
		void summary_food_report();
	}
	
	
	 using namespace cincinnati;
	{
		void summary_food_report();
	}

	
private:

	ifstream infile;
	ofstream outfile;
	
	struct animal
	{
		int type;
		int food;
	}  zoo[100];
	
};
are you're trying to declare a namespace or using an existing one? because you're use using keyword which tell the compiler to use an existing namespace. if you wanna learn about namespaces, enter here:

http://cplusplus.com/doc/tutorial%20%20/namespaces/
Topic archived. No new replies allowed.