Click here to Skip to main content
15,905,877 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Executing an EXE from memory Pin
Larry Antram29-Sep-03 12:23
Larry Antram29-Sep-03 12:23 
GeneralRe: Executing an EXE from memory Pin
Michael Dunn29-Sep-03 16:29
sitebuilderMichael Dunn29-Sep-03 16:29 
QuestionHow to create an "Open With" list? Pin
ralfoide29-Sep-03 8:45
ralfoide29-Sep-03 8:45 
AnswerRe: How to create an "Open With" list? Pin
Amit Dey29-Sep-03 13:33
Amit Dey29-Sep-03 13:33 
GeneralEasy question about formatting a string Pin
NewHSKid29-Sep-03 8:18
NewHSKid29-Sep-03 8:18 
GeneralRe: Easy question about formatting a string Pin
Ravi Bhavnani29-Sep-03 8:35
professionalRavi Bhavnani29-Sep-03 8:35 
GeneralRe: Easy question about formatting a string Pin
David Crow29-Sep-03 8:38
David Crow29-Sep-03 8:38 
GeneralRe: Easy question about formatting a string Pin
WREY29-Sep-03 11:49
WREY29-Sep-03 11:49 
There are several ways. Here are a few.

The example below will display the binary representation for the decimal 100. In addition to '#including' <bitset>, you'll also have to '#include' <limits>

cout<<"\n 100: " <<bitset&lt;numeric_limits&lt;unsigned int&gt;::digits&gt;(100)<<endl;

the="" example="" below="" will="" also="" display="" the="" binary="" configuration="" for="" decimal="" 85.

cout<<"\n="" 85:="" "="" <<bitset<8="">::bitset(85) <<endl;

there are="" some="" subtle="" differences="" between="" the="" first="" example="" and="" second,="" but="" biggest="" is="" that="" in="" second="" you="" interested="" only="" having="" eight="" bits="" to="" represent="" value,="" whereas="" you'll="" get="" 32="" value.="" iow,="" can="" restrict="" number="" of="" want="" have="" representing="" value="" you're="" displaying.

here's="" one="" for="" letters.="" it="" will="" show="" binary="" representation="" letter="" 'a'="" using="" 8="" bits.

cout<<"\n="" \"a\":="" "="" <<bitset<8="">('A') <<endl;

lastly, here's="" one="" to="" show="" a="" string="" of="" letters="" (e.g.="" "abcd").

bitset<32=""> Ltrs = bitset<numeric_limits<unsigned int>::digits>('ABCD');
cout<<"\n \"ABCD\": " <
QuestionValid Pointer ?? Pin
Shah Shehpori29-Sep-03 8:10
sussShah Shehpori29-Sep-03 8:10 
AnswerRe: Valid Pointer ?? Pin
Ravi Bhavnani29-Sep-03 8:39
professionalRavi Bhavnani29-Sep-03 8:39 
AnswerRe: Valid Pointer ?? Pin
David Crow29-Sep-03 8:53
David Crow29-Sep-03 8:53 
AnswerRe: Valid Pointer ?? Pin
igor196029-Sep-03 13:06
igor196029-Sep-03 13:06 
AnswerRe: Valid Pointer ?? Pin
Michael Dunn29-Sep-03 16:33
sitebuilderMichael Dunn29-Sep-03 16:33 
GeneralVisual Assebmler Pin
Stefak29-Sep-03 7:17
Stefak29-Sep-03 7:17 
GeneralDirectShow with MFC Pin
juryu29-Sep-03 7:09
juryu29-Sep-03 7:09 
GeneralRe: DirectShow with MFC Pin
Ravi Bhavnani29-Sep-03 8:42
professionalRavi Bhavnani29-Sep-03 8:42 
GeneralJPEG2000 Pin
gicio29-Sep-03 7:00
gicio29-Sep-03 7:00 
QuestionInternet Explorer Context Menu? Pin
MKlucher29-Sep-03 6:27
MKlucher29-Sep-03 6:27 
AnswerRe: Internet Explorer Context Menu? Pin
Neville Franks29-Sep-03 11:00
Neville Franks29-Sep-03 11:00 
AnswerRe: Internet Explorer Context Menu? Pin
J. Dunlap29-Sep-03 11:49
J. Dunlap29-Sep-03 11:49 
GeneralRe: Internet Explorer Context Menu? Pin
MKlucher29-Sep-03 19:49
MKlucher29-Sep-03 19:49 
GeneralInheriting existing dialogs Pin
PaulUK0129-Sep-03 6:22
PaulUK0129-Sep-03 6:22 
GeneralHough Transform implementation Pin
lipkaj29-Sep-03 5:36
lipkaj29-Sep-03 5:36 
GeneralCustom OnSize handling Pin
Terry O'Nolley29-Sep-03 4:46
Terry O'Nolley29-Sep-03 4:46 
GeneralRe: Custom OnSize handling Pin
David Crow29-Sep-03 4:57
David Crow29-Sep-03 4:57 

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.