Click here to Skip to main content
16,016,501 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhere should I post my TurboC++ / ASM / BIOS question? Pin
Maxwell Chen4-May-02 8:38
Maxwell Chen4-May-02 8:38 
GeneralArray of pointers Pin
Rohde4-May-02 8:16
Rohde4-May-02 8:16 
GeneralRe: Array of pointers Pin
Nish Nishant4-May-02 8:29
sitebuilderNish Nishant4-May-02 8:29 
GeneralRe: Array of pointers Pin
Paul M Watt4-May-02 9:22
mentorPaul M Watt4-May-02 9:22 
GeneralRe: Array of pointers Pin
Maxwell Chen4-May-02 9:33
Maxwell Chen4-May-02 9:33 
GeneralRe: Array of pointers Pin
Christian Graus4-May-02 11:34
protectorChristian Graus4-May-02 11:34 
GeneralRe: Array of pointers Pin
Maxwell Chen4-May-02 20:57
Maxwell Chen4-May-02 20:57 
GeneralSetting Up Option Parameters :: C++ Pin
valikac4-May-02 7:19
valikac4-May-02 7:19 
Hi.

I would like to create a generic class that wraps around, say, an API function. I need a way to pass into a function parameters such as FEATURE1 | FEATURE3. I believe that requires the use of bitwise AND, OR, and NOT similar to MFC programming style.

For example:

-----
// call function to initialize variables

SetVariableA(FEATURE1 | FEATURE 3) // I want feature1 and feature3
-----

Here is what SetVariableA(...) might look like

-----
enum STYLE {FEATURE1 = 0, FEATURE2, FEATURE3}

SetVariableA(...)
{
}
-----

Basically, I am not familiar with the use of enum with bitwise AND, OR, and NOT. Here is a what I would like to accomplish.

- user calls function to setup a feature: function(FEATURE1)
- function determines what feature the user wants

How would you implement some like the above using enum, bitwise AND, OR, and NOT?

Thanks,
Kuphryn

P.S. MFC programmers seem to use the bitwise AND, OR, and NOT
GeneralRe: Setting Up Option Parameters :: C++ Pin
Ravi Bhavnani4-May-02 7:27
professionalRavi Bhavnani4-May-02 7:27 
GeneralRe: Setting Up Option Parameters :: C++ Pin
Maxwell Chen4-May-02 8:14
Maxwell Chen4-May-02 8:14 
GeneralRe: Setting Up Option Parameters :: C++ Pin
valikac4-May-02 8:22
valikac4-May-02 8:22 
GeneralClass scope.... Pin
Maxwell Chen4-May-02 8:28
Maxwell Chen4-May-02 8:28 
GeneralRe: Class scope.... Pin
Ravi Bhavnani4-May-02 9:30
professionalRavi Bhavnani4-May-02 9:30 
GeneralRe: Class scope.... Pin
Maxwell Chen4-May-02 9:37
Maxwell Chen4-May-02 9:37 
GeneralRe: Setting Up Option Parameters :: C++ Pin
Maxwell Chen4-May-02 8:19
Maxwell Chen4-May-02 8:19 
GeneralRe: Setting Up Option Parameters :: C++ Pin
valikac4-May-02 8:24
valikac4-May-02 8:24 
GeneralRe: Setting Up Option Parameters :: C++ Pin
PJ Arends4-May-02 8:31
professionalPJ Arends4-May-02 8:31 
GeneralRe: Setting Up Option Parameters :: C++ Pin
valikac4-May-02 8:43
valikac4-May-02 8:43 
GeneralRe: Setting Up Option Parameters :: C++ Pin
PJ Arends4-May-02 9:12
professionalPJ Arends4-May-02 9:12 
GeneralRe: Setting Up Option Parameters :: C++ Pin
Maxwell Chen4-May-02 9:28
Maxwell Chen4-May-02 9:28 
GeneralRe: Thanks Pin
valikac4-May-02 9:30
valikac4-May-02 9:30 
GeneralRe: Thanks Pin
Todd Smith6-May-02 12:49
Todd Smith6-May-02 12:49 
GeneralRe: Hex Pin
valikac4-May-02 9:54
valikac4-May-02 9:54 
GeneralRe: Hex Pin
Maxwell Chen4-May-02 10:04
Maxwell Chen4-May-02 10:04 
GeneralRe: Hex Pin
valikac4-May-02 10:13
valikac4-May-02 10:13 

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.