www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/03/11/10:28:50

From: ckgp!thomas AT uunet DOT uu DOT net
Subject: STRCMP (again)
To: uunet!sun.soe.clarkson.edu!djgpp AT uunet DOT UU DOT NET
Date: Thu, 11 Mar 93 8:53:49 EST

Thanks for the responses...

  my program was simple:

  ======================================
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>

  main()
  {
   char line[2][81];
   int stat=0;

   printf("\nline 1: ");
   gets(line[0]);
   printf("\nline 2: ");
   gets(line[1]);
   stat = strcmp(line[0],line[1]);
   printf("\nresult: %d",stat);
   exit(0);
  }
  =======================================

  I noticed the problem in a huge program and thought that maybe I screwed
  something up some place, so I wrote this one just to make sure... and still
  got the same strange results.

  BUT,

  now that problem has simple vanished and when I compile the program (this one)
  the compiler says something about line being undeclared on its first use
  in main (or something like that?)

  I am really starting to think that there is something wrong with my hard
  drive or math co-processor or something...

  Anyway thanks for all the help...

================================================================================
Thank you,            ||  "Sol est invisiblis in hominibus, in terra vero
Michael Thomas        ||   visibilis, tamen ex uno et eodem sole sunt ambo"
(..uunet!ckgp!thomas) ||                    -- Theatrum Chemicum (Ursel, 1602)
================================================================================


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019