Click here to Skip to main content
15,887,267 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Help with Binary Pin
Roger Stoltz27-Mar-09 0:33
Roger Stoltz27-Mar-09 0:33 
GeneralRe: Help with Binary Pin
FISH78627-Mar-09 1:31
FISH78627-Mar-09 1:31 
AnswerRe: Help with Binary Pin
CPallini27-Mar-09 0:35
mveCPallini27-Mar-09 0:35 
GeneralRe: Help with Binary Pin
Michael Schubert27-Mar-09 0:39
Michael Schubert27-Mar-09 0:39 
GeneralRe: Help with Binary Pin
CPallini27-Mar-09 0:45
mveCPallini27-Mar-09 0:45 
GeneralRe: Help with Binary Pin
Michael Schubert27-Mar-09 0:51
Michael Schubert27-Mar-09 0:51 
AnswerRe: Help with Binary Pin
Divyang Mithaiwala27-Mar-09 0:42
Divyang Mithaiwala27-Mar-09 0:42 
AnswerRe: Help with Binary Pin
Stuart Dootson27-Mar-09 0:45
professionalStuart Dootson27-Mar-09 0:45 
AnswerRe: Help with Binary Pin
David Crow27-Mar-09 3:07
David Crow27-Mar-09 3:07 
QuestionProblem in loading Image,GetLastError 33 Pin
hemlat26-Mar-09 23:01
hemlat26-Mar-09 23:01 
AnswerRe: Problem in loading Image,GetLastError 33 Pin
CPallini26-Mar-09 23:15
mveCPallini26-Mar-09 23:15 
AnswerRe: Problem in loading Image,GetLastError 33 Pin
Michael Schubert27-Mar-09 0:50
Michael Schubert27-Mar-09 0:50 
AnswerRe: Problem in loading Image,GetLastError 33 Pin
David Crow27-Mar-09 3:08
David Crow27-Mar-09 3:08 

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.