Mail Archives: djgpp/1993/01/17/14:14:56
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 -