error: missing ';' before 'using'

I am using Visual Studio 2010 and I keep getting this error.

 
booktype.cpp(6): error C2143: syntax error : missing ';' before 'using'


booktype.cpp is the method definitions for my booktype.h file. The area of bookType.cpp that the ERROR is referring to is:

1
2
3
4
5
6
7
8
9
#include "bookType.h"
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
using namespace std;


void getHeadings(ofstream& outfile,istream& infile,string  headings[])


I am sort of at a loss here because I cant really put a ";" anywhere before "using", can I?
Last edited on
You may be forgetting a trailing ; somewhere after a class declaration inside bookType.h.
Here is my bookType.h file.

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
#ifndef bookType_H
#define bookType_H 

#include <iostream>
#include <fstream>
#include <string>
//#include <cstdlib>
#include <iomanip>
using namespace std;


const int MAX_BOOKS = 500;

 struct bookType
	{
	public:
	 string headings[15];
		string item_name [MAX_BOOKS];
		string listing_id [MAX_BOOKS];
		string seller_sku [MAX_BOOKS];
		string price [MAX_BOOKS];
		string quantity [MAX_BOOKS];
		string open_date [MAX_BOOKS];
		string item_note [MAX_BOOKS];
		string item_condition [MAX_BOOKS];
		string product_id [MAX_BOOKS];
		string market [MAX_BOOKS];
		string book_header_line;

		string marketName[MAX_BOOKS];

void getHeadings(ofstream& outfile,istream& infile,string  headings[]);


void readBooks(ofstream &outfile,ifstream &infile,bookType MyBooks);

void readMarkets(bookType MyBooks);
 } // Forgot the ";" here <----------------------------------------------------------
#endif 




Thank you :]
Last edited on
Topic archived. No new replies allowed.