Click here to Skip to main content
15,881,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: strange problem with MSVCRT Pin
AbhishekBK9-Aug-06 22:02
AbhishekBK9-Aug-06 22:02 
GeneralRe: strange problem with MSVCRT Pin
sach!!9-Aug-06 22:42
sach!!9-Aug-06 22:42 
GeneralRe: strange problem with MSVCRT [modified] Pin
sunit59-Aug-06 23:39
sunit59-Aug-06 23:39 
GeneralRe: strange problem with MSVCRT Pin
sach!!10-Aug-06 0:02
sach!!10-Aug-06 0:02 
GeneralRe: strange problem with MSVCRT Pin
AbhishekBK10-Aug-06 1:07
AbhishekBK10-Aug-06 1:07 
GeneralRe: strange problem with MSVCRT Pin
sach!!10-Aug-06 21:02
sach!!10-Aug-06 21:02 
GeneralRe: strange problem with MSVCRT Pin
AbhishekBK10-Aug-06 22:42
AbhishekBK10-Aug-06 22:42 
QuestionMaking Forward Declaration Class's enum Member Visible Pin
yccheok9-Aug-06 21:43
yccheok9-Aug-06 21:43 
hello all,

how can i make, a forward declaration class's enum member, being
visible by another class?

consider the following case,

----------------------------
dog.h
----------------------------
#ifndef DOG_H
#define DOG_H

// class forward declaration.
class cat;

class dog
{
public:
enum dog_enum
{
d0, d1, d2
};

void speak(cat *c);

};

#endif

----------------------------
cat.h
----------------------------
#ifndef CAT_H
#define CAT_H

#include "dog.h"

class cat
{
public:
void speak(dog *d, dog::dog_enum e);

};

#endif

The above cat and dog just work fine. Now, let me create an enum type
for cat too.

----------------------------
dog.h
----------------------------
#ifndef DOG_H
#define DOG_H

// class forward declaration.
class cat;

class dog
{
public:
enum dog_enum
{
d0, d1, d2
};

// OPPS! HOW DO WE FORWARD DECLARE ENUM???
void speak(cat *c, cat::cat_enum e);

};

#endif

----------------------------
cat.h
----------------------------
#ifndef CAT_H
#define CAT_H

#include "dog.h"

class cat
{
public:
enum cat_enum
{
c0, c1, c2
};

void speak(dog *d, dog::dog_enum e);

};

#endif

My question is, how can "dog" see the cat_enum, which is re-inside cat?
I was understand that forward declaration for enum is not allowed in
c++.

Is there any workaround for this?

Thank you very much
Questionsend data from mdichild to other mdichild Pin
ms.linuz9-Aug-06 21:36
ms.linuz9-Aug-06 21:36 
QuestionFile reading error Pin
Anu_Bala9-Aug-06 21:30
Anu_Bala9-Aug-06 21:30 
AnswerRe: File reading error Pin
Cedric Moonen9-Aug-06 21:43
Cedric Moonen9-Aug-06 21:43 
AnswerRe: File reading error Pin
David Crow10-Aug-06 3:22
David Crow10-Aug-06 3:22 
QuestionCan i store DC content as bitmap [modified] Pin
Ramu.e9-Aug-06 21:20
Ramu.e9-Aug-06 21:20 
AnswerRe: Can i store DC content as bitmap Pin
Naveen9-Aug-06 21:30
Naveen9-Aug-06 21:30 
AnswerRe: Can i store DC content as bitmap Pin
Hamid_RT9-Aug-06 21:43
Hamid_RT9-Aug-06 21:43 
AnswerRe: Can i store DC content as bitmap Pin
Hamid_RT9-Aug-06 22:26
Hamid_RT9-Aug-06 22:26 
Questionevent viewer writting problem Pin
_tasleem9-Aug-06 21:16
_tasleem9-Aug-06 21:16 
AnswerRe: event viewer writting problem Pin
kakan9-Aug-06 23:27
professionalkakan9-Aug-06 23:27 
Questionvirtual destructor Pin
lavate malllik9-Aug-06 21:07
lavate malllik9-Aug-06 21:07 
AnswerRe: virtual destructor Pin
ThatsAlok9-Aug-06 21:19
ThatsAlok9-Aug-06 21:19 
GeneralRe: virtual destructor Pin
lavate malllik9-Aug-06 21:29
lavate malllik9-Aug-06 21:29 
AnswerRe: virtual destructor Pin
toxcct9-Aug-06 21:26
toxcct9-Aug-06 21:26 
GeneralRe: virtual destructor Pin
lavate malllik9-Aug-06 21:32
lavate malllik9-Aug-06 21:32 
GeneralRe: virtual destructor Pin
Zac Howland10-Aug-06 4:17
Zac Howland10-Aug-06 4:17 
AnswerRe: virtual destructor Pin
Hamid_RT9-Aug-06 21:29
Hamid_RT9-Aug-06 21:29 

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.