Click here to Skip to main content
15,927,055 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSofware modems Pin
TOMCAT8117-Apr-05 20:23
TOMCAT8117-Apr-05 20:23 
GeneralGlobal Scope in C Pin
Arsalan Malik17-Apr-05 20:15
Arsalan Malik17-Apr-05 20:15 
GeneralRe: Global Scope in C Pin
22491717-Apr-05 20:47
22491717-Apr-05 20:47 
GeneralRe: Global Scope in C Pin
David Crow18-Apr-05 2:45
David Crow18-Apr-05 2:45 
GeneralRe: Global Scope in C Pin
CodeBeetle18-Apr-05 10:16
CodeBeetle18-Apr-05 10:16 
GeneralRe: Global Scope in C Pin
haritadala19-Apr-05 4:07
haritadala19-Apr-05 4:07 
Generalconvert unsigned char to const char in vc++ Pin
nehathoma17-Apr-05 19:11
nehathoma17-Apr-05 19:11 
GeneralRe: convert unsigned char to const char in vc++ Pin
ThatsAlok17-Apr-05 19:40
ThatsAlok17-Apr-05 19:40 
nehathoma wrote:
could anyone plz tell me as soon as possible how to convert an unsigned char to const char using vc++ code?

I believe we can do it that by using normal C++ code.

I think you are looking for conversion of unsigned char string to signed char string instead of unsigned char to signed char.

Here anyways, this Task can be accomplish by using typecasting! (if you don't know what exactly the type casting is? please refer to your TEXT book!)

//typecasting By direct initialization 
   unsigned char *unChar=(unsigned char*) "unsigned string";

//second Unsigned char string to signed char string
  char sigString[100];
  strcpy(sigString,(const char*)unChar);









"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


cheers,
Alok Gupta
GeneralRe: convert unsigned char to const char in vc++ Pin
22491717-Apr-05 20:34
22491717-Apr-05 20:34 
GeneralRe: convert unsigned char to const char in vc++ Pin
ThatsAlok17-Apr-05 20:46
ThatsAlok17-Apr-05 20:46 
GeneralRe: convert unsigned char to const char in vc++ Pin
22491717-Apr-05 20:53
22491717-Apr-05 20:53 
GeneralRe: convert unsigned char to const char in vc++ Pin
ThatsAlok17-Apr-05 21:07
ThatsAlok17-Apr-05 21:07 
GeneralRe: convert unsigned char to const char in vc++ Pin
nehathoma17-Apr-05 20:49
nehathoma17-Apr-05 20:49 
GeneralRe: convert unsigned char to const char in vc++ Pin
ThatsAlok17-Apr-05 21:10
ThatsAlok17-Apr-05 21:10 
GeneralRe: convert unsigned char to const char in vc++ Pin
nehathoma17-Apr-05 21:14
nehathoma17-Apr-05 21:14 
GeneralRe: convert unsigned char to const char in vc++ Pin
ThatsAlok17-Apr-05 21:22
ThatsAlok17-Apr-05 21:22 
GeneralRe: convert unsigned char to const char in vc++ Pin
nehathoma17-Apr-05 21:33
nehathoma17-Apr-05 21:33 
GeneralRe: convert unsigned char to const char in vc++ Pin
22491717-Apr-05 22:29
22491717-Apr-05 22:29 
GeneralRe: convert unsigned char to const char in vc++ Pin
nehathoma17-Apr-05 22:55
nehathoma17-Apr-05 22:55 
GeneralRe: convert unsigned char to const char in vc++ Pin
22491717-Apr-05 23:00
22491717-Apr-05 23:00 
GeneralWinHttp- WinHttpSendRequest fails Pin
naeemrbhatti17-Apr-05 19:01
naeemrbhatti17-Apr-05 19:01 
GeneralListCtrl items not displayed Pin
laiju17-Apr-05 18:06
laiju17-Apr-05 18:06 
GeneralRe: ListCtrl items not displayed Pin
ThatsAlok17-Apr-05 18:33
ThatsAlok17-Apr-05 18:33 
GeneralRe: ListCtrl items not displayed Pin
Michael Dunn17-Apr-05 19:00
sitebuilderMichael Dunn17-Apr-05 19:00 
GeneralRe: ListCtrl items not displayed Pin
laiju17-Apr-05 19:19
laiju17-Apr-05 19:19 

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.