Quote Originally Posted by devilsummer View Post
That is why I posted this problem here, because I cant find a solution
Just in addition -- you wound up using char arrays to represent strings -- once you did that, then you need to know how to use char arrays, and obviously you didn't know how to do this.

You cannot compare char arrays (or any arrays) using the logical operators <, >, <=, >=, etc. You have to write a loop or call a function that loops over all the elements and determines which item is different in each array. In the case of char arrays, the function is strcmp.

If you had instead used a std::string, then all of that code you had would have worked, since <, >, <=, >=, etc. are all supported by std::string. The trick is that if you're writing this kind of code, use types that are supported by the operators used in such code.


Paul McKenzie