X
Xiaoshen Li
Dear All,
My textbookd of C++ teaches string before teaching pointer. After
teaching pointer, it doesn't come back to string. I hope to learn how to
use a pointer to char to manipulate string?
For example, I saw code:
char *pString = new char[20];
char *pS = "Good morning";
What is the difference between the above two ways? How to set pString to
"Hello world"?
Thank you very much.
My textbookd of C++ teaches string before teaching pointer. After
teaching pointer, it doesn't come back to string. I hope to learn how to
use a pointer to char to manipulate string?
For example, I saw code:
char *pString = new char[20];
char *pS = "Good morning";
What is the difference between the above two ways? How to set pString to
"Hello world"?
Thank you very much.