Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: fopen a File Named During Run-time Message-ID: <14006@smoke.BRL.MIL> Date: 3 Oct 90 21:11:20 GMT References: <37852@ut-emx.uucp> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 10 In article <37852@ut-emx.uucp> albert@emx.utexas.edu (Lo Mau Tout) writes: >In ANSI C, the prototype of fopen is supposed to be >FILE *fopen ( const char *filename, const char *mode ); >Does that mean I cannot specify in the position of the first parameter >a filename[i], where i is an integer, of type char *filename[] ? Sure you can. That direction of qualification is compatible. The other, where you would try feeding a pointer to const to a function that is expecting to be able to scribble on what is pointed to, would not be allowed.