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

comparing bytes from 2 files...

P: 25
Is it possible to compare 2 bytes using strcmp() command?
Sep 20 '06 #1
Share this Question
Share on Google+
4 Replies


Banfa
Expert Mod 5K+
P: 8,916
no but it is using the memcmp function

int memcmp( const void *buf1, const void *buf2, size_t count );
Sep 20 '06 #2

P: 25
thanks for the answer....
another question can i compare 1 byte to another byte using the memcmp?
Sep 20 '06 #3

Banfa
Expert Mod 5K+
P: 8,916
thanks for the answer....
another question can i compare 1 byte to another byte using the memcmp?
Yes, although you could also just use ==

memcmp will compare any number of bytes > 0
Sep 20 '06 #4

P: 25
thanks again for the reply...
Sep 20 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.