Yes there is an alternative.
- get a size of string
- create an array of the same size as is the string
- copy the contents of the string into that array
- point nmto your allocated array
Or you could use strdup - btw strdup is not part of C++ STL…
Yes there is an alternative.
nm to your allocated arrayOr you could use strdup - btw strdup is not part of C++ STL…
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)