Compare large char*'s

Jul 2, 2011 at 3:46pm
Hello,
I need to know something.
Why won't compare large char* strings?
Because i need to do that.
The weird thing is that when i put their contents on screen,
The text is the same but it still won't say that they match.
Jul 2, 2011 at 3:49pm
How are you comparing them? With strcmp? Why not just use std::string? (In general it is easier to answer questions if we can see a bit of your code ;) )
Jul 2, 2011 at 3:59pm
closed account (zwA4jE8b)
pehaps you have an 'unseen' char like '\n' or something.
Jul 2, 2011 at 5:39pm
1. I use char* because that is the type my parser (pugixml) returns.
2. I'll post the code when i get rid of a weird segfault.
Jul 2, 2011 at 5:48pm
It was indeed invisible chars,
I feed it in strncmp and substract 1 from the count, and it worked like a charm!
Thx to all!
Topic archived. No new replies allowed.