Detailed explanation of string in C++