whats worng with this?

I this header is just supposed to make a data object for data storage:
area.h:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef AR_H
#define AR_H
class area
{
	public:
	area();
	~area();
	
	void initialize();
	struct pt {
		int x;
		int y;
		int set;
	} tl,tr,bl,br;
	int x,y,width,height;
	private:
}
#endif 

area.cpp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "area.h"

area::area() 
{
}
void area::initialize()
{
	tl.set=0;
	tl.x=0;
	tl.y=0;
	tr.set=0;
	tr.x=0;
	tr.y=0;
	bl.set=0;
	bl.x=0;
	bl.y=0;
	br.set=0;
	br.x=0;
	br.y=0;
}
area::~area()
{
}


error compiling:
1
2
3
4
jdd:p9wbullets jdd$ g++ -c area.cpp
area.cpp:3: error: new types may not be defined in a return type
area.cpp:3: note: (perhaps a semicolon is missing after the definition of ‘area’)
area.cpp:3: error: return type specification for constructor invalid

Last edited on
Missing semicolon on line 17 in area.h
Sometimes compiler do actually help to point out the problem:
note: (perhaps a semicolon is missing after the definition of ‘area’)

I think this is quite obvious.
Topic archived. No new replies allowed.