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

C / C++ / MFC

 
GeneralRe: [OT] Re: LPTSTR problem Pin
Eytukan27-Mar-09 6:49
Eytukan27-Mar-09 6:49 
GeneralRe: LPTSTR problem Pin
CPallini27-Mar-09 7:09
mveCPallini27-Mar-09 7:09 
GeneralRe: LPTSTR problem Pin
Joe Woodbury27-Mar-09 7:12
professionalJoe Woodbury27-Mar-09 7:12 
GeneralRe: LPTSTR problem Pin
CPallini27-Mar-09 7:25
mveCPallini27-Mar-09 7:25 
GeneralRe: LPTSTR problem Pin
Stuart Dootson27-Mar-09 1:48
professionalStuart Dootson27-Mar-09 1:48 
GeneralRe: LPTSTR problem Pin
Joe Woodbury27-Mar-09 5:51
professionalJoe Woodbury27-Mar-09 5:51 
GeneralRe: LPTSTR problem Pin
Stuart Dootson27-Mar-09 6:09
professionalStuart Dootson27-Mar-09 6:09 
GeneralRe: LPTSTR problem Pin
Joe Woodbury27-Mar-09 6:22
professionalJoe Woodbury27-Mar-09 6:22 
AnswerRe: LPTSTR problem Pin
CPallini27-Mar-09 0:49
mveCPallini27-Mar-09 0:49 
AnswerRe: LPTSTR problem Pin
Cedric Moonen27-Mar-09 0:51
Cedric Moonen27-Mar-09 0:51 
GeneralRe: LPTSTR problem Pin
zakkas248327-Mar-09 1:03
zakkas248327-Mar-09 1:03 
GeneralRe: LPTSTR problem Pin
CPallini27-Mar-09 1:10
mveCPallini27-Mar-09 1:10 
GeneralRe: LPTSTR problem Pin
zakkas248327-Mar-09 1:14
zakkas248327-Mar-09 1:14 
GeneralRe: LPTSTR problem Pin
Eytukan27-Mar-09 1:26
Eytukan27-Mar-09 1:26 
GeneralRe: LPTSTR problem Pin
zakkas248327-Mar-09 1:53
zakkas248327-Mar-09 1:53 
QuestionRe: LPTSTR problem [modified] Pin
CPallini27-Mar-09 1:44
mveCPallini27-Mar-09 1:44 
AnswerRe: LPTSTR problem Pin
Joe Woodbury27-Mar-09 5:30
professionalJoe Woodbury27-Mar-09 5:30 
GeneralRe: LPTSTR problem Pin
CPallini27-Mar-09 7:06
mveCPallini27-Mar-09 7:06 
GeneralRe: LPTSTR problem Pin
Joe Woodbury27-Mar-09 7:10
professionalJoe Woodbury27-Mar-09 7:10 
GeneralRe: LPTSTR problem Pin
CPallini27-Mar-09 7:17
mveCPallini27-Mar-09 7:17 
QuestionHelp with Binary Pin
FISH78627-Mar-09 0:11
FISH78627-Mar-09 0:11 
Can someone please tell me how to get the following to display the right binary display and not have the '1' show up at the end.

eg value (3 * 5) = 15 -> 1111
value (1 + 1) = 2 -> 1011 How do i stop it at 10.

If i change the 4 to 2 it works. If the calculations go back to 15. I don't get the 1111 only 11. What am I missing?

thanks a million
char string[64];
int value;

for (int bit = 0; bit < 4; bit++)
   {
       int mask = value >> bit;
       if ((value &  mask) == mask)
               string[bit] = '1';
       else
               string[bit] = '0';
   }
       string[4] = '\0';


thanks a million
AnswerRe: Help with Binary Pin
Michael Schubert27-Mar-09 0:20
Michael Schubert27-Mar-09 0:20 
GeneralRe: Help with Binary Pin
FISH78627-Mar-09 0:36
FISH78627-Mar-09 0:36 
GeneralRe: Help with Binary Pin
Michael Schubert27-Mar-09 0:40
Michael Schubert27-Mar-09 0:40 
QuestionRe: Help with Binary Pin
CPallini27-Mar-09 0:43
mveCPallini27-Mar-09 0:43 

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.