Click here to Skip to main content
15,923,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSetting Up Option Parameters :: C++ Pin
valikac4-May-02 7:19
valikac4-May-02 7:19 
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 
I used to do this way......

#include <iostreamᡊe9ac73-238b-46be-991d-0f050c37248dusing namespace std;

enum ST { enType1 = 0x01, enType2 = 0x02, enType3 = 0x03 };

void SetVar(int style)
{
	int tt;
	for(tt = enType1; tt <= enType3; tt = (tt << 1))
	{
		if(style & tt)
			cout << "Type " << tt / 2 + 1 << " implemented\n";
	}
}

void main()
{
	SetVar(enType1 | enType3);
}

Smile | :)

Maxwell Chen
People say "No news is good news". Then, no code is good code!?
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 
GeneralRe: Hex Pin
Maxwell Chen4-May-02 10:20
Maxwell Chen4-May-02 10:20 
GeneralRe: Hex Pin
valikac4-May-02 11:50
valikac4-May-02 11:50 
GeneralRe: Hex Pin
PJ Arends9-May-02 20:36
professionalPJ Arends9-May-02 20:36 
GeneralRe: Hex Pin
valikac10-May-02 4:37
valikac10-May-02 4:37 
GeneralRe: Hex Pin
Michael Dunn4-May-02 10:07
sitebuilderMichael Dunn4-May-02 10:07 
GeneralRe: Hex Pin
valikac4-May-02 10:10
valikac4-May-02 10:10 
GeneralAdding something to the system menu in the title bar Pin
Stan the man4-May-02 7:11
Stan the man4-May-02 7:11 

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.