Click here to Skip to main content
15,920,383 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Cstring to char * error Pin
David Crow22-Jun-06 2:33
David Crow22-Jun-06 2:33 
AnswerRe: Cstring to char * error Pin
Zac Howland22-Jun-06 3:20
Zac Howland22-Jun-06 3:20 
GeneralRe: Cstring to char * error Pin
David Crow22-Jun-06 3:35
David Crow22-Jun-06 3:35 
GeneralRe: Cstring to char * error Pin
Zac Howland22-Jun-06 3:39
Zac Howland22-Jun-06 3:39 
GeneralRe: Cstring to char * error Pin
kitty521-Jun-06 9:52
kitty521-Jun-06 9:52 
GeneralRe: Cstring to char * error Pin
David Crow21-Jun-06 10:15
David Crow21-Jun-06 10:15 
QuestionRe: Cstring to char * error Pin
David Crow21-Jun-06 9:36
David Crow21-Jun-06 9:36 
AnswerRe: Cstring to char * error Pin
kitty521-Jun-06 9:50
kitty521-Jun-06 9:50 
DavidCrow wrote:
Why do you need to? What is it that the CString object is not doing that char* will?


You can't parse each char of the CString string like a char*...?Confused | :confused:
i.e. :
char *string = "0x2";
int cReturn = 0;
for(i = 2; i < nStringSize; i++)
{
cReturn = cReturn*16;
// Decode ASCII
if((string[i] >= '0') && (string[i] <= '9'))
cReturn += string[i] - '0';
else if((string[i] >= 'A') && (string[i] <= 'F'))
cReturn += string[i] - 'A' + 0xa;
else if((string[i] >= 'a') && (string[i] <= 'f'))
cReturn += string[i] - 'a' + 0xa;
else
// Incorrect character
return 0;
}


Kitty5
GeneralRe: Cstring to char * error Pin
David Crow21-Jun-06 10:16
David Crow21-Jun-06 10:16 
GeneralRe: Cstring to char * error Pin
Zac Howland21-Jun-06 13:23
Zac Howland21-Jun-06 13:23 
QuestionRe: Cstring to char * error Pin
David Crow21-Jun-06 9:12
David Crow21-Jun-06 9:12 
AnswerRe: Cstring to char * error [modified] Pin
kitty521-Jun-06 9:29
kitty521-Jun-06 9:29 
QuestionRe: Cstring to char * error Pin
David Crow21-Jun-06 9:35
David Crow21-Jun-06 9:35 
Questionlist in mfc Pin
kamalesh8221-Jun-06 7:42
kamalesh8221-Jun-06 7:42 
AnswerRe: list in mfc Pin
led mike21-Jun-06 7:55
led mike21-Jun-06 7:55 
GeneralRe: list in mfc Pin
kamalesh8221-Jun-06 8:00
kamalesh8221-Jun-06 8:00 
GeneralRe: list in mfc [modified] Pin
Zac Howland21-Jun-06 8:35
Zac Howland21-Jun-06 8:35 
QuestionRe: list in mfc Pin
David Crow21-Jun-06 9:11
David Crow21-Jun-06 9:11 
AnswerRe: list in mfc Pin
led mike21-Jun-06 10:19
led mike21-Jun-06 10:19 
AnswerRe: list in mfc Pin
Hamid_RT21-Jun-06 19:31
Hamid_RT21-Jun-06 19:31 
QuestionDouble to String Pin
Max++21-Jun-06 6:59
Max++21-Jun-06 6:59 
AnswerRe: Double to String Pin
Greg Daye21-Jun-06 7:04
Greg Daye21-Jun-06 7:04 
AnswerRe: Double to String Pin
Jun Du21-Jun-06 7:08
Jun Du21-Jun-06 7:08 
AnswerRe: Double to String Pin
Hamid_RT21-Jun-06 19:25
Hamid_RT21-Jun-06 19:25 
QuestionMFC CfileDialog Pin
Manjunath S21-Jun-06 6:38
Manjunath S21-Jun-06 6:38 

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.