This question is closed. Reopen it to edit or answer.
Comparing two equal strings doesnt work
2 views (last 30 days)
I have a list of strings (containing hockey player names) and I want to find the index for a specific name.I never had such an easy problem before and it is driving my insane.
I tried this:
player and index are both "Connor McDavid"
player = Player(1);
index1 = string(200);
logic = strcmp(index1 ,player);
Here are screenshots too ensure that they contain the same value.
logic should return a 1 but it returns 0. I tried == too but it doesnt help.
Pls help me, i dont know what to do anymore.