T
tvn007
// I am using strtok to break the string
// For example: to extract 5 from the string below:
// TEST 1,P,5,PASS
// Below is my code in C:
ptr =strtok(testbuff," \t\n,()");
ptr =strtok(NULL," \t\n,()");
ptr =strtok(NULL," \t\n,()");
ptr =strtok(NULL," \t\n,()");
// My question: is there a better way to do this in C++,
// assumed testbuff is C++ string type.
// Thanks in advance for any hint,
// For example: to extract 5 from the string below:
// TEST 1,P,5,PASS
// Below is my code in C:
ptr =strtok(testbuff," \t\n,()");
ptr =strtok(NULL," \t\n,()");
ptr =strtok(NULL," \t\n,()");
ptr =strtok(NULL," \t\n,()");
// My question: is there a better way to do this in C++,
// assumed testbuff is C++ string type.
// Thanks in advance for any hint,