home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!paladin.american.edu!europa.asd.contel.com!darwin.sura.net!rsg1.er.usgs.gov!news.cs.indiana.edu!umn.edu!lynx!triton.unm.edu!rsahu
- From: rsahu@triton.unm.edu (Raikanta Sahu)
- Subject: Another simple C question
- Message-ID: <!+-n84@lynx.unm.edu>
- Date: Sun, 23 Aug 92 03:14:59 GMT
- Organization: University of New Mexico, Albuquerque
- Distribution: unm
- Lines: 38
-
- Here is another problem I am facing in compilation with our RISC compiler
- in triton @ unm.
- ------------------------------------------------------------------------
- #include <stdio.h>
-
- main(argc, argv)
- int argc ;
- char *argv[] ;
- {
-
- char infile[50] ;
-
- if(argc == 1)
- {
- printf("Give input file : ") ;
- scanf("%s", infile) ;
- }
- else
- infile = argv[1] ;
-
- getinput(infile) ;
-
- }
- ------------------------------------------------------------------------
-
- Here is the message of the compiler :
-
-
-
- ccom: Error: check.c, line 16: illegal lhs of assignment operator
- infile = argv[1] ;
- ---------------------^
-
- Isn't it legal to assign a pointer to a character to a character array ?
- Somebody mentioned to me that RISC is not an ANSI compatible compiler. Is
- that so ?
-
- -sahu,r
-