void logCombination(std::string cur)

Do you need the std:: ? You already included the using namespace std.