Click here to Skip to main content
16,005,080 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Path and tables of a .mdb file Pin
Paresh Chitte7-May-07 18:09
Paresh Chitte7-May-07 18:09 
AnswerRe: Path and tables of a .mdb file Pin
Hamid_RT7-May-07 19:50
Hamid_RT7-May-07 19:50 
GeneralRe: Path and tables of a .mdb file Pin
David Crow8-May-07 3:12
David Crow8-May-07 3:12 
GeneralRe: Path and tables of a .mdb file Pin
Hamid_RT8-May-07 8:04
Hamid_RT8-May-07 8:04 
Questionhow to combine different dialogs Pin
sonavi7-May-07 14:20
sonavi7-May-07 14:20 
AnswerRe: how to combine different dialogs Pin
Hans Dietrich7-May-07 14:56
mentorHans Dietrich7-May-07 14:56 
Questionshow autofilter drop-down arrow in excel Pin
Haiying7-May-07 10:32
Haiying7-May-07 10:32 
QuestionCombine enum values Pin
Nathan Gloyn7-May-07 10:12
Nathan Gloyn7-May-07 10:12 
Hope somebody can help as I'm pulling my hair out hereMad | :mad:

I normally code in C# but have had to use C++ and STL for project and having difficulty in finding out how to combine enum values in C++.

In C# I'd | the values together e.g.

<br />
r = VALUE1; <br />
r = r|VALUE2;<br />


doing this then allows me to check the enum later to see what values it matches, an example of this would possibly be a validtion routing that returns a single enum value but that value could contain multiple values indicating multiple failures.

I've been googling and found code examples that show enum's being combined in the same way, but when I try to do it the compiler gives me the following error:

error C2676: binary '|=' : 'Contract::ValidInput' does not define this operator or a conversion to a type acceptable to the predefined operator

I've looked at operator overloading but to be honest overloading the | operator is beyond my C++ skills, which are limited at best.

Can anybody help me out whilst I still have some hair?
AnswerRe: Combine enum values [modified] Pin
Mark Salsbery7-May-07 10:38
Mark Salsbery7-May-07 10:38 
GeneralRe: Combine enum values Pin
Nathan Gloyn7-May-07 23:16
Nathan Gloyn7-May-07 23:16 
GeneralRe: Combine enum values Pin
Mark Salsbery8-May-07 4:24
Mark Salsbery8-May-07 4:24 
AnswerRe: Combine enum values Pin
Haiying7-May-07 10:44
Haiying7-May-07 10:44 
AnswerRe: Combine enum values Pin
toxcct7-May-07 12:23
toxcct7-May-07 12:23 
QuestionProblem with AtlAxCreateDialog Pin
aamir.zia7-May-07 9:34
aamir.zia7-May-07 9:34 
AnswerRe: Problem with AtlAxCreateDialog Pin
David Crow7-May-07 9:52
David Crow7-May-07 9:52 
QuestionProblem with AtlAxCreateDialog Pin
aamir.zia7-May-07 9:26
aamir.zia7-May-07 9:26 
QuestionRe: Problem with AtlAxCreateDialog Pin
Mark Salsbery7-May-07 10:20
Mark Salsbery7-May-07 10:20 
AnswerRe: Problem with AtlAxCreateDialog Pin
Stephen Hewitt7-May-07 14:00
Stephen Hewitt7-May-07 14:00 
QuestionSetIcon Error / Exception Pin
ScotDolan7-May-07 9:12
ScotDolan7-May-07 9:12 
AnswerRe: SetIcon Error / Exception Pin
ScotDolan7-May-07 9:39
ScotDolan7-May-07 9:39 
QuestionRe: SetIcon Error / Exception Pin
David Crow7-May-07 9:50
David Crow7-May-07 9:50 
AnswerRe: SetIcon Error / Exception Pin
Hans Dietrich7-May-07 14:28
mentorHans Dietrich7-May-07 14:28 
AnswerRe: SetIcon Error / Exception Pin
Hamid_RT7-May-07 19:43
Hamid_RT7-May-07 19:43 
QuestionCToolBar force the position even in hidden places Pin
Endaroza7-May-07 8:35
Endaroza7-May-07 8:35 
AnswerRe: CToolBar force the position even in hidden places Pin
Hans Dietrich7-May-07 14:42
mentorHans Dietrich7-May-07 14:42 

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.