Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > string comparison, help!

Reply
Thread Tools

string comparison, help!

 
 
Al-Burak
Guest
Posts: n/a
 
      12-11-2005
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

 
Reply With Quote
 
 
 
 
Neelesh Bodas
Guest
Posts: n/a
 
      12-11-2005

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?

 
Reply With Quote
 
 
 
 
Al-Burak
Guest
Posts: n/a
 
      12-11-2005
Oops! sorry. I clicked in the wrong group..



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'System.String[]' from its string representation 'String[] Array' =?Utf-8?B?UmFqZXNoIHNvbmk=?= ASP .Net 0 05-04-2006 04:29 PM
Is "String s = "abc";" equal to "String s = new String("abc");"? Bruce Sam Java 15 11-19-2004 06:03 PM
String[] files = {"a.doc, b.doc"}; VERSUS String[] files = new String[] {"a.doc, b.doc"}; Matt Java 3 09-17-2004 10:28 PM
String.replaceAll(String regex, String replacement) question Mladen Adamovic Java 3 12-05-2003 04:20 PM
Re: String.replaceAll(String regex, String replacement) question Mladen Adamovic Java 0 12-04-2003 04:40 PM



Advertisments