Inspired by this reply: http://www.cplusplus.com/forum/beginner/248142/3/#msg1094076
So, literally, string is an array of a bunch of character. But what it's different from array is, it can resize itself no matter how many time you want and it the size of it need not be known in compilation time. Out of curiosity, how does string work like which:
1. allows to let its size not to be known in compilation time and
2. can resize itself?
The string class uses dynamic memory allocation to manage the storage of the characters. This allows it to allocate memory when it needs to, to store whatever it's told to store.