   Declare a Class with a number as its name
  HiI have probably a simple problem but there doesn't seem to be any explaination of this kind of thing when I search googleI have declared a class call 2dEngine & I am getting an error when I compile & I believe its coz I have a number in a class name. Is that correct? Is it possible to create a class that has a number in its name?#ifndef ENGINE_H#define ENGINE_H/// Declare Types ///typedef class SystemEngine;typedef class InputEngine;typedef class GraphicEngine;typedef class AudioEngine;typedef class Object;class 2dEngine{ public:   2dEngine();~2dEngine();int StartClockTimer();int StopClockTimer();  private:SystemEngine  *SystemCont;InputEngine   *InputCont;GraphicEngine *GraphicCont;AudioEngine   *AudioCont;HWND hwnd; unsigned int  ClockTickInterval;};#endif // ENGINE_HError when compiling:"In the file included from 2dEngine.cpp invalid suffix 'dEngine' on integer Constant"   
  Use Engine2D.   ;  You can't have class name begin with a number, just like Dave said.   ;Quote:Original post by grettyHiI have probably a simple problem but there doesn't seem to be any explaination of this kind of thing when I search googleI have declared a class call 2dEngine & I am getting an error when I compile & I believe its coz I have a number in a class name. Is that correct? Is it possible to create a class that has a number in its name?Yes, you can have numbers in class names.  It just can't start with a number.This rule applies to everything else too, variable names, function names, etc...;  Try:Engine2DEngineOr some interesting name. Obsidian2D? :P   ;Rules for choosing identifiers in C++;Quote:The dollar sign is also a valid identifier in Visual C++.// dollar_sign_identifier.cppstruct $Y1$ {   void $Test$() {}};int main() {   $Y1$ $x$;   $x$.$Test$();(Why does the quote not work?)uhh. Who wants to use a $-sign in his variable names?$Me$Likes$$$.$GetMore$($$$Money$$$); [Edited by - jpetrie on June 6, 2010 4:05:16 PM];Quote:(Why does the quote not work?)quote="MSDN", which you had, isn't valid. It's just quote. The "originally posted by" bits are actually just regular text included automatically by the forum software in certain spots, if you manually quote you must manually add them.I fixed your quote tag.   ;  TwoDEngine, is that so bad?   ;  Awesome2DEngine