1 C++ Clan Tue Jan 11, 2011 11:36 pm
des
Achiever
Who would like to be part of my C++ clan? I will be adding members to my clan. Show me some C++ projects you have done and I'll let you in. If not, then your out. You must please follow the rules:
Rules
1) You must know how to program on C++
2) Share and give out tutorials on C++
3) Respect the captain(MeDesu)
4) Don't steal anyone's work.
5) Want to work in groups? Go ahead
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Rules will be updated- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you want to give out some little examples to the users, go ahead.
Example:
- Code:
/* memcmp example */
#include <stdio.h>
#include <string.h>
int main ()
{
char str1[256];
char str2[256];
int n;
printf ("Enter a sentence: "); gets(str1);
printf ("Enter another sentence: "); gets(str2);
n=memcmp ( str1, str2, 256 );
if (n>0) printf ("'%s' is greater than '%s'.\n",str1,str2);
else if (n<0) printf ("'%s' is less than '%s'.\n",str1,str2);
else printf ("'%s' is the same as '%s'.\n",str1,str2);
return 0;
}
Now that examples does this:
Returns an integral value indicating the relationship between the content of the memory blocks:
A zero value indicates that the contents of both memory blocks are equal.
A value greater than zero indicates that the first byte that does not match in both memory blocks has a greater value in ptr1 than in ptr2 as if evaluated as unsigned char values; And a value less than zero indicates the opposite. If you want to be in, please post. "I want to be in." If you have any questions, just ask.
Last edited by Desu on Wed Jan 12, 2011 1:20 am; edited 2 times in total