Rather Trivial Question.
So I tried to do this:
if (array[0]=="some_string")
where array is a list of strings
array[0] = "some_string_1";
array[1] = "some_string_2";
array[2] = "some_string_3";
but obviously it doesn’t work…
What do I have to do?
Note:
'a'is acharand"a"is astring, so'a' != "a"charis a single character (actually int), so if you want to compare strings, usestrcmpinstead.