Added .c_str() as indicated by Richard-J