Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualServant of the Lord

Posted 07 September 2012 - 11:07 AM

I'd actually do not direct string comparison. It's easy in the beginning, but will grow too fast to be managable.

I wouldn't use it either, but I don't know the OP's skill level, and am guessing from his post he hasn't yet mastered basic comparison. I could be wrong though! Posted Image

#1Servant of the Lord

Posted 07 September 2012 - 10:43 AM

I'd actually do not direct string comparison. It's easy in the beginning, but will grow too fast to be managable.

True, but this is a case of "If <the OP> has to ask for the basic question, they probably aren't ready for the advanced solution". I'd definitely not do direct string comparison either; but I wouldn't recommend what I'd personally use to someone who is asking a question that the third chapter of any introductory C++ book teaches you. Posted Image

You have to teach the lower level concept of comparison before you can abstract to a higher level, otherwise the OP would just copy+paste maps and vectors without understanding at all what they actually do. He doesn't need to know how they work at first, but he does need to know what they do - and he won't be able to understand what they do, without first understanding comparison.

At least, that's how I read the situation.

PARTNERS