Help! Issue trying to use string methods (strcmp) in jungle code coach problem in c++ | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Help! Issue trying to use string methods (strcmp) in jungle code coach problem in c++

I am sure I am missing something quite obvious but I do not understand why I get an error saying strcmp is not declared in this scope, as I've been using other string objects in there. The (unfinished) code is at https://code.sololearn.com/c4ZL6f6U0F4W/?ref=app thanks in advance!!!

29th Jan 2020, 10:30 PM
CheshireCat
CheshireCat - avatar
3 ответов
+ 3
It says so right in the error message bud: "'strcmp' is defined in header '<cstring>'" However, I see that you're trying to give strcmp a character as an argument, don't do that, it's undefined behavior.
29th Jan 2020, 10:58 PM
Dennis
Dennis - avatar
0
Thanks!
29th Jan 2020, 11:41 PM
CheshireCat
CheshireCat - avatar
0
I managed to finally solve the challenge without using strcmp but now I know how to do so. Thanks a lot!!
30th Jan 2020, 12:41 AM
CheshireCat
CheshireCat - avatar