We will begin with CString and int formats.
If you want to convert from int number to CString you can use syntax:
int  numberNeedConvert; 
CString numberConvert; 
... 
// If you do not use unicode format for your progamme numberConvert.Format("%d",numberNeedConvert);
// If you use unicode format for your programme
numberConvert.Format(L"%d",numberNeedConvert); You will be able to convert CString to int if you use that syntax:
int number;
CString cstringNeedConvert;
char* temp;
...
// Convert CString to char* here
char* temp;
...
// Convert CString to char* here
...
number = atoi(temp);
I hope it will help you. Please email to me if you need some help.
Thanks for visiting my blog!
 
 
 
Không có nhận xét nào:
Đăng nhận xét