User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 402,624 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,149 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 17406 | Replies: 2
Reply
Join Date: Feb 2004
Posts: 4
Reputation: Darc is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Darc Darc is offline Offline
Newbie Poster

"missing storage-class or type specifiers" error

  #1  
Feb 25th, 2004
hey, my first post here 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);

};
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2004
Posts: 4
Reputation: Darc is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Darc Darc is offline Offline
Newbie Poster

Re: "missing storage-class or type specifiers" error

  #2  
Feb 25th, 2004
btw, stdafx.h has include statements for both cTile.h and cMap.h
Reply With Quote  
Join Date: Mar 2004
Posts: 76
Reputation: infamous is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 2
infamous infamous is offline Offline
Junior Poster in Training

Re: "missing storage-class or type specifiers" error

  #3  
Mar 23rd, 2004
why would a system header be including your class files? try adding #include "cTile.h" to cMap.h instead.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 1:32 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC