C
CPlusPlus
char* pStr = "This is a test";
char* token = strtok(pStr, " "); // space as delimiter
Above simple code throws an exception. I think I understand why.
Pointer pStr points to a constant string.
1. How can I tokenize pStr using pointers?
2. What is the difference between const char *p and char* const p?
TY
char* token = strtok(pStr, " "); // space as delimiter
Above simple code throws an exception. I think I understand why.
Pointer pStr points to a constant string.
1. How can I tokenize pStr using pointers?
2. What is the difference between const char *p and char* const p?
TY