Click here to Skip to main content
16,007,277 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Radio Button Query. Pin
cagespear3-Apr-08 20:31
cagespear3-Apr-08 20:31 
GeneralRe: Radio Button Query. Pin
Cedric Moonen3-Apr-08 20:49
Cedric Moonen3-Apr-08 20:49 
GeneralRe: Radio Button Query. Pin
cagespear4-Apr-08 0:53
cagespear4-Apr-08 0:53 
GeneralOnInitialUpdate is not working. Pin
Le@rner3-Apr-08 18:26
Le@rner3-Apr-08 18:26 
GeneralRe: OnInitialUpdate is not working. Pin
Nibu babu thomas3-Apr-08 18:33
Nibu babu thomas3-Apr-08 18:33 
QuestionRe: OnInitialUpdate is not working. Pin
David Crow4-Apr-08 3:22
David Crow4-Apr-08 3:22 
Generalsigned to unsigned char conversion Pin
vikramaditya2343-Apr-08 16:53
vikramaditya2343-Apr-08 16:53 
GeneralRe: signed to unsigned char conversion [modified] Pin
Nibu babu thomas3-Apr-08 17:34
Nibu babu thomas3-Apr-08 17:34 
vikramaditya234 wrote:
I have to convert signed char and signed char* to unsigned char and unsigned char* respectively.


Cast to appropriate type! E.g.

signed char SignedChar = 'A'; // signed keyword can be skipped!
unsigned char UnsignedChar = (unsigned char)SignedChar;

signed char* pSignedChars = "ABCDEDF"; // signed keyword can be skipped!
unsigned char* pUnsignedChars = (unsigned char*)pSignedChars;



vikramaditya234 wrote:
I have read that using (unsigned char) is not very safe and can cause.


Normally signed chars are used for string operations and unsigned chars are used as bytes. In windows a BYTE is an unsigned char! signed chars normally have NUL termination and unsigned chars are normally accompanied by their length, since users of such an array don't have an idea where it ends! So how safe it is depends on how you code!


Nibu thomas
Microsoft MVP for VC++


Code must be written to be read, not by the compiler, but by another human being.

Programming Blog: http://nibuthomas.wordpress.com

modified on Thursday, April 3, 2008 11:41 PM

GeneralRe: signed to unsigned char conversion Pin
vikramaditya2343-Apr-08 18:58
vikramaditya2343-Apr-08 18:58 
GeneralRe: signed to unsigned char conversion Pin
Nibu babu thomas3-Apr-08 19:00
Nibu babu thomas3-Apr-08 19:00 
GeneralRe: signed to unsigned char conversion Pin
Rajesh R Subramanian3-Apr-08 21:20
professionalRajesh R Subramanian3-Apr-08 21:20 
GeneralRe: signed to unsigned char conversion Pin
Cedric Moonen3-Apr-08 21:34
Cedric Moonen3-Apr-08 21:34 
GeneralRe: signed to unsigned char conversion Pin
Rajesh R Subramanian3-Apr-08 22:33
professionalRajesh R Subramanian3-Apr-08 22:33 
GeneralRe: signed to unsigned char conversion Pin
Rajesh R Subramanian3-Apr-08 22:39
professionalRajesh R Subramanian3-Apr-08 22:39 
GeneralRe: signed to unsigned char conversion Pin
Cedric Moonen3-Apr-08 22:42
Cedric Moonen3-Apr-08 22:42 
GeneralRe: signed to unsigned char conversion Pin
Rajesh R Subramanian3-Apr-08 22:57
professionalRajesh R Subramanian3-Apr-08 22:57 
GeneralRe: signed to unsigned char conversion Pin
vikramaditya23418-Apr-08 3:19
vikramaditya23418-Apr-08 3:19 
GeneralAlignment in edit box [modified] Pin
Joseph Marzbani3-Apr-08 9:54
Joseph Marzbani3-Apr-08 9:54 
GeneralRe: Alignment in edit box Pin
led mike3-Apr-08 10:10
led mike3-Apr-08 10:10 
GeneralRe: Alignment in edit box Pin
Mark Salsbery3-Apr-08 10:19
Mark Salsbery3-Apr-08 10:19 
GeneralRe: Alignment in edit box Pin
led mike3-Apr-08 10:40
led mike3-Apr-08 10:40 
GeneralRe: Alignment in edit box Pin
bob169723-Apr-08 17:33
bob169723-Apr-08 17:33 
GeneralRe: Alignment in edit box Pin
bob169723-Apr-08 17:41
bob169723-Apr-08 17:41 
GeneralDeveloping a toolbar for Windows Explorer Pin
Nitheesh George3-Apr-08 8:23
Nitheesh George3-Apr-08 8:23 
GeneralRe: Developing a toolbar for Windows Explorer Pin
James R. Twine3-Apr-08 8:28
James R. Twine3-Apr-08 8:28 

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.