Click here to Skip to main content
15,921,716 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
barneyman8-May-11 22:37
barneyman8-May-11 22:37 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729928-May-11 22:50
Member 29729928-May-11 22:50 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729928-May-11 23:11
Member 29729928-May-11 23:11 
AnswerRe: Problem Opening Email when using InvokeHelper in C++ Pin
Roger Broomfield9-May-11 1:37
Roger Broomfield9-May-11 1:37 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729929-May-11 2:04
Member 29729929-May-11 2:04 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729929-May-11 2:25
Member 29729929-May-11 2:25 
QuestionWant logic or code for this in c Pin
KIDYA6-May-11 4:08
KIDYA6-May-11 4:08 
AnswerRe: Want logic or code for this in c Pin
CodyDaemon6-May-11 4:18
CodyDaemon6-May-11 4:18 
GeneralRe: Want logic or code for this in c Pin
KIDYA6-May-11 4:30
KIDYA6-May-11 4:30 
AnswerRe: Want logic or code for this in c Pin
Luc Pattyn6-May-11 4:30
sitebuilderLuc Pattyn6-May-11 4:30 
GeneralRe: Want logic or code for this in c Pin
CPallini6-May-11 10:17
mveCPallini6-May-11 10:17 
GeneralRe: Want logic or code for this in c Pin
Luc Pattyn6-May-11 15:30
sitebuilderLuc Pattyn6-May-11 15:30 
QuestionEncrypting the existing file and folder Pin
sarfaraznawaz6-May-11 1:22
sarfaraznawaz6-May-11 1:22 
AnswerRe: Encrypting the existing file and folder Pin
ShilpiP6-May-11 1:42
ShilpiP6-May-11 1:42 
AnswerRe: Encrypting the existing file and folder Pin
Richard MacCutchan6-May-11 3:05
mveRichard MacCutchan6-May-11 3:05 
GeneralRe: Encrypting the existing file and folder Pin
sarfaraznawaz11-May-11 22:49
sarfaraznawaz11-May-11 22:49 
GeneralRe: Encrypting the existing file and folder Pin
Richard MacCutchan11-May-11 23:22
mveRichard MacCutchan11-May-11 23:22 
Questionhow to assign unsigned char in c++? Pin
mathivanaan6-May-11 1:00
mathivanaan6-May-11 1:00 
AnswerRe: how to assign unsigned char in c++? Pin
Chris Losinger6-May-11 1:01
professionalChris Losinger6-May-11 1:01 
QuestionRe: how to assign unsigned char in c++? Pin
Niklas L6-May-11 1:18
Niklas L6-May-11 1:18 
AnswerRe: how to assign unsigned char in c++? Pin
CPallini6-May-11 10:18
mveCPallini6-May-11 10:18 
AnswerRe: how to assign unsigned char in c++? Pin
Stefan_Lang6-May-11 2:21
Stefan_Lang6-May-11 2:21 
AnswerRe: how to assign unsigned char in c++? Pin
Luc Pattyn6-May-11 2:43
sitebuilderLuc Pattyn6-May-11 2:43 
AnswerRe: how to assign unsigned char in c++? Pin
CPallini6-May-11 10:21
mveCPallini6-May-11 10:21 
AnswerRe: how to assign unsigned char in c++? Pin
mike@codeproject8-May-11 5:51
mike@codeproject8-May-11 5:51 
You are getting a 10 as a binary value with that assignment.

If you use cout<< to print it out, however, you won't see a 10. That's because cout<< called on a char or unsigned char value always treats the value as a character, not a number. What you will see is that the next thing you output will begin on a new line. The 10 translates to a '\n' newline character.

To see the binary value of a char as a unsigned decimal value, use a typecast first.
unsigned char bb = 10;
cout << "** bb looks like [" << bb <<] this." << endl;
cout << "** (unsigned)bb looks like: " << (unsigned)bb << endl;

Which should display:

** bb looks like [
] this.
** (unsigned)bb looks like: 10

I put the unsigned char version in [] brackets so you can see what the effect is on the output.

Cheers,
Mike

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.