Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!julius.cs.uiuc.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!crdgw1!ge-dab!tarpit!bilver!alex From: alex@bilver.UUCP (Alex Matulich) Newsgroups: comp.std.c Subject: Re: fopen a File Named During Run-time Message-ID: <1071@bilver.UUCP> Date: 6 Oct 90 04:16:03 GMT References: <37852@ut-emx.uucp> Reply-To: alex@bilver.UUCP (Alex Matulich) Distribution: usa Organization: /etc/origination Lines: 18 In article <37852@ut-emx.uucp> albert@emx.utexas.edu (Lo Mau Tout) writes: >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[] ? As I understand it, the "const char *" means that fopen() cannot modify the pointer in any way. It's perfectly OK to pass it any character pointer. The pointer doesn't have to be a string constant. Such a prototype isn't really necessary; most likely it is there to reassure you, the programmer, that the pointer you pass will still point at the same place when the function is through with it. -- _ |__ Alex Matulich (alex@bilver.UUCP) /(+__> Unicorn Research Corp, 4621 N Landmark Dr, Orlando, FL 32817 //| \ UUCP: ...uunet!tarpit!bilver!alex ///__) bitnet: IN%"bilver!alex@uunet.uu.net"