![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Oct 2005
Posts: 48
Rep Power: 0
![]() |
char *
I have a a string
char *chMsg = "02222AAA00"; i wana separate this "02222AAA00" into part by part.. Like this "0", "2222", "AAA", "00". so i declared 4 variables char *chOne = new char[1]; //"0" char *chTwo = new char[4]; //"2222" char *chThree= new char[3]; //"AAA" char *chFour = new char[2]; //"00" than, i use strncpy strncpy(chOne, chMsg, 1); but how to get the "2222" from "02222AAA00"??? |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|