What is the disadvantage (if any) of using string class over char array ??
String Class (strings)
There is no such disadvantage of using string class. Instead it makes certain task simpler.
You can refer this https://www.geeksforgeeks.org/char-vs-stdstring-vs-char-c/