What is class String ?
Triued to read ay many places form google, but cant seem to be understand
What is class String ?
Triued to read ay many places form google, but cant seem to be understand
std::string is a class that represents a string, which is basically a series of characters.
In the old days, in C, a string was a contiguous block of characters in memory that terminated with a '\0' char. This resulted in many bugs and issues because great care was required that the programmer do everything right, so when C++ was invented, the std::string class was introduced to help make life easier for programmers. It is much safer and provides an OO view of a string.