When should I use std::string
and when should I use char*
to manage arrays of char
s in C++?
It seems you should use char*
if performance(speed) is crucial and you're willing to accept some of a risky business because of the memory management.
Are there other scenarios to consider?
My point of view is: