home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex158.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
981b
|
30 lines
// Example: 158 from Library Reference
#include "..\3D-Ware\dddware.h"
#include <stdio.h>
void PrintResult(short result); // Declare function prototype.
char string1[]={"Test String."};
char string2[]={"Test String 2."};
char string3[]={"Test String."};
short result;
short main(void)
{
printf("Strings are :- \"%s\" and \"%s\"\n",string1, string2);
PrintResult(dddStrCmp(string1,string2)); // Compare the strings.
printf("Strings are :- \"%s\" and \"%s\"\n",string1, string3);
PrintResult(dddStrCmp(string1,string3)); // Compare the strings.
printf("Strings are :- \"%s\" and \"%s\"\n",string2, string3);
PrintResult(dddStrCmp(string2,string3)); // Compare the strings.
return 0;
}
void PrintResult(short result)
{
if (result == 0)
{
printf("These strings are identical.\n\n");
}
if (result == 1)
{
printf("These strings are different.\n\n");
}
}