How can I alphabetize strings from an array in c++?
问题 I have to write a program that sorts 10 people by height, then by last name. I've got the height down, but i can't get the last name sort to work. I'm trying to use strcmp for it. Any time I try to run it though, it flags an error at the strcmp saying, "[Error] cannot convert 'std::string {aka std::basic_string}' to 'const char*' for argument '1' to 'int strcmp(const char*, const char*)'" I'm using strcmp because this is for a school assignment and I am limited by my knowledge of c++ and what