I know the starting address of the string(e.g., char* buf) and the max length int l; of the string(i.e., total number of characters is less than or equ
char* buf
int l;
char *charPtr = "test string"; cout << charPtr << endl; string str = charPtr; cout << str << endl;