943,463 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 26692
  • C++ RSS
Feb 25th, 2004
0

"missing storage-class or type specifiers" error

Expand Post »
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

C++ Syntax (Toggle Plain Text)
  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. };
Reputation Points: 11
Solved Threads: 0
Newbie Poster
Darc is offline Offline
4 posts
since Feb 2004
Feb 25th, 2004
0

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

btw, stdafx.h has include statements for both cTile.h and cMap.h
Reputation Points: 11
Solved Threads: 0
Newbie Poster
Darc is offline Offline
4 posts
since Feb 2004
Mar 23rd, 2004
0

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

why would a system header be including your class files? try adding #include "cTile.h" to cMap.h instead.
Reputation Points: 47
Solved Threads: 2
Junior Poster in Training
infamous is offline Offline
77 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: C++ Relcat/Attrcat catalog help
Next Thread in C++ Forum Timeline: access Digital Camera Functions





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC