"missing storage-class or type specifiers" error

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2004
Posts: 4
Reputation: Darc is an unknown quantity at this point 
Solved Threads: 0
Darc Darc is offline Offline
Newbie Poster

"missing storage-class or type specifiers" error

 
0
  #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

  1. //cTile.h
  2. #pragma once
  3.  
  4. #include "stdafx.h"
  5.  
  6. class cTile
  7.  
  8. {
  9.  
  10. private:
  11.  
  12. HBITMAP m_tiles;
  13.  
  14. HDC m_buffer;
  15.  
  16.  
  17.  
  18.  
  19.  
  20. long m_width,
  21.  
  22. m_height,
  23.  
  24. m_rows,
  25.  
  26. m_columns;
  27.  
  28.  
  29.  
  30. public:
  31.  
  32. cTile(HBITMAP, long, long, long, long);
  33.  
  34. ~cTile(void);
  35.  
  36. long GetWidth(void);
  37.  
  38. long GetHeight(void);
  39.  
  40. long GetRows(void);
  41.  
  42. long GetColumns(void);
  43.  
  44. BOOL DrawTile(HDC, long, long, long, long);
  45.  
  46. };
  47.  
  48. //cMap.h
  49. #pragma once
  50.  
  51. #include "stdafx.h"
  52.  
  53. class cMap
  54.  
  55. {
  56.  
  57. private:
  58.  
  59. char *m_map;
  60.  
  61. cTile *m_tile;
  62.  
  63. public:
  64.  
  65. cMap(void);
  66.  
  67. ~cMap(void);
  68.  
  69. };
Reply With Quote Quick reply to this message  
Join Date: Feb 2004
Posts: 4
Reputation: Darc is an unknown quantity at this point 
Solved Threads: 0
Darc Darc is offline Offline
Newbie Poster

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

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

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

 
0
  #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 Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC