By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,227 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,227 IT Pros & Developers. It's quick & easy.

string comparison, help!

P: n/a
How does one compares two char pointers in 'C', for instance, lets say
that I want to know if cp1 is less, equal, or grater than cp2?
TIA

Dec 11 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Al-Burak wrote:
How does one compares two char pointers in 'C',
By asking a question in relavent group like comp.lang.c or by looking
up in a relavent book or searching on the net.
for instance, lets say that I want to know if cp1 is less, equal, or grater than cp2?


char *x, *y;
//....
x<y; // true if x is less than y.

But why would you want to compare _poiner_s?

Dec 11 '05 #2

P: n/a
Oops! sorry. I clicked in the wrong group..

:(

Dec 11 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.