I want to do something with the buffer related to extract 'string' data.
If I dont want to duplicate memory resources, Must I to work with it using c?
(not c++) trought cstring funtions ?
Is another way?
Thanks
Um, I'm a bit confused on your request, but are you looking for something that would convert a "string" datatype to a "char *" datatype? You can try the"c_str()" method in a string.
Ex:
1 2
string str = "Hello World!";
char *cStr = (char *)str.c_str(); // We have to do some type-casting here