Syntax error

I have a .h that looks like the following:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef dm_Steps_h       
#define dm_Steps_h
#include "dm_Steps.h"
#endif 

#ifndef dm_Tracks_h       
#define dm_Tracks_h
#include "dm_Tracks.h"
#endif 

# include <vector>

class dm_Data
{
public:
	vector<dm_Step> m_steps;
	void print();
};


This h file is used along with several other h files as well as a .cpp file. When I try to build the project, I get the following error which corresponds to the above h file:


Error 1 error C2143: syntax error : missing ';' before '<'

It says the error is on line 16 of the h file. Where do I need to include a semicolon on line 16? Maybe the problem lies within other parts of my code which I can post if needed.
I'd be willing to bet that you forgot the semicolon at the end of either your dm_Steps class or your dm_Tracks class definition.
1
2
3
class dm__ {
   ...
} //<-- Whoops, no ; 
vector is in the std namespace, so it must be std::vector.
On another note, header guards belong inside a header, not "outside".
Topic archived. No new replies allowed.