home *** CD-ROM | disk | FTP | other *** search
/ Virtual Reality Madness / VRMAD96_ONE.ISO / virtek / libex / libex158.c < prev    next >
C/C++ Source or Header  |  1995-08-24  |  981b  |  30 lines

  1.                                            // Example: 158 from Library Reference
  2. #include "..\3D-Ware\dddware.h"
  3. #include  <stdio.h>
  4. void PrintResult(short result);            // Declare function prototype.
  5. char    string1[]={"Test String."};
  6. char    string2[]={"Test String 2."};
  7. char    string3[]={"Test String."};
  8. short   result;
  9. short  main(void)
  10. {
  11.   printf("Strings are :- \"%s\" and \"%s\"\n",string1, string2);
  12.   PrintResult(dddStrCmp(string1,string2)); // Compare the strings.
  13.   printf("Strings are :- \"%s\" and \"%s\"\n",string1, string3);
  14.   PrintResult(dddStrCmp(string1,string3)); // Compare the strings.
  15.   printf("Strings are :- \"%s\" and \"%s\"\n",string2, string3);
  16.   PrintResult(dddStrCmp(string2,string3)); // Compare the strings.
  17.   return 0;
  18. }
  19. void  PrintResult(short result)
  20. {
  21.   if  (result == 0)
  22.   {
  23.     printf("These strings are identical.\n\n");
  24.   }
  25.   if  (result == 1)
  26.   {
  27.     printf("These strings are different.\n\n");
  28.   }
  29. }
  30.