c++ - Help about class and error: C3861 -


Can anyone help me in this error?

In "cDef.h":

  #pragma once class cf {public: static id STATE_LOGO; Fixed id STATE_MENU; Static difference MESSAGE_ENTER; Static int MESSAGE_UPDATE; Fixed int MESSAGE_PAINT; Static int MESSAGE_EXIT; }; In "GameState H",  

:

  #pragma once #ifndef _GameState_ #define _GameState_ #include "cDef.h" class MainGame; Class gamestate; Class gamestate {public: MenGame * MG; Int GAME_STATE_DEF; Virtual Void Message Center (Int Message) = 0; Virtual void MessengeUpdate (int message, int keys) = 0; Virtual Zero Message Pen (Int Message, CDC * PDC) = 0; Zero StateHandler (Int Message, CDC * PDC, Int keys); Public: GameState (zero); Public: ~ GameState (zero); }; #endif  

In "GameState.cpp":

  #include "stdAfx.h" # "GameState.h" Include GameState :: GameState (Zero) {GAME_STATE_DEF = -1; } GameState :: ~ GameState (Zero) {} Zero GameState :: Statehandler (Int Message, CDC * PDC, Int Key) {if (message == cDef.MESSAGE_ENTER} {Message Center (Messaging); } If (message == cDef.MESSAGE_UPDATE) {message updates (message, key); } If (message == cDef.MESSAGE_PAINT) {messagepint (message, PDC); }}  

Error:

  Warning C4832: token '.' 'CDF' error is invalid after C3861: 'MessageUpdate': Identifier not found Error C3861: 'MessageEnter': Identifier not found Error C3861: 'MessagePaint': Identifier not found ...  

Thanks in advance!

Here I had to learn to come from Java in C ++ Java which I used to hammer in my students and always :: , . , and - & gt; :

was confused about using
  • a :: b means a is either a class or Name is the name of the place.
  • AB means A is either a reference to an object or an object.
  • A-> B means A is either an indicator or a type of object that has operator-> If you know this, you can apply them even backwards so that you have A and < Code> B , you know what to put in the middle

    (I think these rules have to be extended for C ++ 11, but I'm not sure. Do not know if you know it Is phony.)


Comments