954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

"missing storage-class or type specifiers" error

hey, my first post here :D and I don't think it's too much of a problem... I just can't get it to work. This is a simple Tile Engine written in GDI32/C++.

Errors:
c:\Documents and Settings\Default\My Documents\Visual Studio Projects\Dragon Slayer UM\Dragon Slayer UM\cMap.h(10) : error C2143: syntax error : missing ';' before '*'

c:\Documents and Settings\Default\My Documents\Visual Studio Projects\Dragon Slayer UM\Dragon Slayer UM\cMap.h(10) : error C2501: 'cMap::cTile' : missing storage-class or type specifiers

c:\Documents and Settings\Default\My Documents\Visual Studio Projects\Dragon Slayer UM\Dragon Slayer UM\cMap.h(10) : error C2501: 'cMap::m_tile' : missing storage-class or type specifiers

//cTile.h 
#pragma once

#include "stdafx.h"

class cTile

{

private:

HBITMAP m_tiles;

HDC m_buffer;





long m_width, 

m_height, 

m_rows, 

m_columns;

 

public:

cTile(HBITMAP, long, long, long, long);

~cTile(void);

long GetWidth(void);

long GetHeight(void);

long GetRows(void);

long GetColumns(void);

BOOL DrawTile(HDC, long, long, long, long);

};
 
//cMap.h
#pragma once

#include "stdafx.h"

class cMap

{

private:

char *m_map;

cTile *m_tile;

public:

cMap(void);

~cMap(void);

};
Darc
Newbie Poster
4 posts since Feb 2004
Reputation Points: 11
Solved Threads: 0
 

btw, stdafx.h has include statements for both cTile.h and cMap.h

Darc
Newbie Poster
4 posts since Feb 2004
Reputation Points: 11
Solved Threads: 0
 

why would a system header be including your class files? try adding #include "cTile.h" to cMap.h instead.

infamous
Junior Poster in Training
77 posts since Mar 2004
Reputation Points: 47
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You