www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/01/17/14:14:56

Date: Sun, 17 Jan 93 12:30:25 CST
From: "Jeremy Mathers" <pynq AT midway DOT uchicago DOT edu>
To: sngattan AT interceptor DOT ksu DOT ksu DOT edu
Subject: Re: C-language Problem?
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

Some 18 year old wrote:

>	I am working in c:\ktran\image directory.  I want to open
>a file in c:\ktran\pgm directory...the filename is "crk1.pgm"

>****Begin part of the code

>	
>	char buffer[80];
>	buffer = "c:\\ktran\\pgm\\crk1.pgm";

>	inpfile = fopen (buffer,"rb");
>        if (inpfile == NULL) {
>		fprintf (stderr,"Cannot open input file ******"\n");
>		return 0;
>	}

>****End of code

This won't compile on any C compiler I've ever seen.  Something about
constants being just that - unchangeable...

- Raw text -


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