std::string mystring; char first_char; first_char = mystring[0];You can make function that does it:
inline char getfirstchar(std::string &s) { // If the string is empty this function will return \0 which // is good. So we don't need to do a special check for that. return s[0]; }