how do i compare two strings or char.. otherthan using strcmp??

Recommended Answers

All 3 Replies

In C you can write your own strcmp() by comparing each character of the first string with each character of the second string. If the length of the two strings are not the same then they are obviously not the same thing. If they are the same length then you need to compare the two strings character-by-character.

SIR ANcienT DragoN thanks for the advice..

ammm do you remeber by basic programming problems.. wer the country code must be answered with their names and telephone operators..

i thnks strcmp is the problem there... =(

by the way thanks again...

see yah

SIR ANcienT DragoN thanks for the advice..

ammm do you remeber by basic programming problems.. wer the country code must be answered with their names and telephone operators..

I don't know what your problem is with strcmp() but to answer your other question, yes I do remember having a party-line telephone with a real-live operator. I also had a crank phone, which was a few years before we got dial phone in our area. I don't know what that has to do with the original question though. :-/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.