string comparison, help!

A

Al-Burak

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
 
N

Neelesh Bodas

Al-Burak said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top