Click here to Skip to main content
15,901,122 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: get the process' path by its pid Pin
Krauze14-Jun-10 1:52
Krauze14-Jun-10 1:52 
AnswerRe: get the process' path by its pid Pin
Richard MacCutchan13-Jun-10 23:40
mveRichard MacCutchan13-Jun-10 23:40 
GeneralRe: get the process' path by its pid Pin
Krauze14-Jun-10 1:53
Krauze14-Jun-10 1:53 
GeneralRe: get the process' path by its pid Pin
Richard MacCutchan14-Jun-10 3:58
mveRichard MacCutchan14-Jun-10 3:58 
QuestionRe: get the process' path by its pid Pin
norish14-Jun-10 8:41
norish14-Jun-10 8:41 
AnswerRe: get the process' path by its pid Pin
Krauze14-Jun-10 15:55
Krauze14-Jun-10 15:55 
QuestionListBox (CListBox) focus frame problems introduced with a shlwapi.dll security update in Windows XP 32 bit Pin
User 2694213-Jun-10 21:52
professionalUser 2694213-Jun-10 21:52 
QuestionC2061 Pin
T.RATHA KRISHNAN13-Jun-10 21:06
T.RATHA KRISHNAN13-Jun-10 21:06 
Hi!

I've defined two classes. I've used the object of the first class inside the second class and the object of the second class inside the first class. I've forward declared both the classes. But I got the following error

error C2061: syntax error : identifier 'initialMenu'

My Code is:

class InitialMenu;  //forward declaration
class PlayMenu;

class InitialMenu : public IEventReceiver
{
 private:
	     SAppContext &Context;
         PlayMenu *playMenu;
 public:
	 InitialMenu(SAppContext &context) : Context(context)
	 {
          }
          
         virtual bool OnEvent(const SEvent& event)
	 {
          playMenu = new PlayMenu(Context);
			 return true;
         }
};
          

class PlayMenu : public IEventReceiver
	 {
	  private:
		      SAppContext &Context;
              InitialMenu* initialMenu;
	  public:
		  PlayMenu(SAppContext &context) : Context(context)
		  {
                  }
                  virtual bool OnEvent(const SEvent& event)
		  {
                   initialMenu = new initialMenu(Context);
					  return true;
                  } 
};


How to resolve this error?
AnswerRe: C2061 Pin
«_Superman_»13-Jun-10 21:15
professional«_Superman_»13-Jun-10 21:15 
AnswerRe: C2061 PinPopular
Richard MacCutchan13-Jun-10 21:35
mveRichard MacCutchan13-Jun-10 21:35 
GeneralRe: C2061 Pin
Aescleal13-Jun-10 21:38
Aescleal13-Jun-10 21:38 
GeneralRe: C2061 Pin
Richard MacCutchan13-Jun-10 22:46
mveRichard MacCutchan13-Jun-10 22:46 
AnswerRe: C2061 Pin
Aescleal13-Jun-10 21:35
Aescleal13-Jun-10 21:35 
AnswerRe: C2061 Pin
sunlin715-Jun-10 2:45
sunlin715-Jun-10 2:45 
GeneralRe: C2061 Pin
sunlin715-Jun-10 2:48
sunlin715-Jun-10 2:48 
AnswerRe: C2061 Pin
ThatsAlok17-Jun-10 0:06
ThatsAlok17-Jun-10 0:06 
QuestionGetting addresses...setjmp/longjmp Pin
_AnsHUMAN_ 13-Jun-10 20:34
_AnsHUMAN_ 13-Jun-10 20:34 
AnswerRe: Getting addresses...setjmp/longjmp Pin
«_Superman_»13-Jun-10 21:00
professional«_Superman_»13-Jun-10 21:00 
GeneralRe: Getting addresses...setjmp/longjmp Pin
_AnsHUMAN_ 13-Jun-10 22:25
_AnsHUMAN_ 13-Jun-10 22:25 
GeneralRe: Getting addresses...setjmp/longjmp Pin
«_Superman_»13-Jun-10 22:27
professional«_Superman_»13-Jun-10 22:27 
GeneralRe: Getting addresses...setjmp/longjmp Pin
_AnsHUMAN_ 13-Jun-10 22:50
_AnsHUMAN_ 13-Jun-10 22:50 
AnswerRe: Getting addresses...setjmp/longjmp Pin
Aescleal13-Jun-10 21:27
Aescleal13-Jun-10 21:27 
GeneralRe: Getting addresses...setjmp/longjmp Pin
_AnsHUMAN_ 13-Jun-10 22:23
_AnsHUMAN_ 13-Jun-10 22:23 
GeneralRe: Getting addresses...setjmp/longjmp Pin
Aescleal13-Jun-10 22:37
Aescleal13-Jun-10 22:37 
GeneralRe: Getting addresses...setjmp/longjmp Pin
_AnsHUMAN_ 13-Jun-10 22:47
_AnsHUMAN_ 13-Jun-10 22:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.