fopen a File Named During Run-time
Alex Matulich
alex at bilver.UUCP
Sat Oct 6 14:16:03 AEST 1990
In article <37852 at ut-emx.uucp> albert at 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 at bilver.UUCP)
/(+__> Unicorn Research Corp, 4621 N Landmark Dr, Orlando, FL 32817
//| \ UUCP: ...uunet!tarpit!bilver!alex
///__) bitnet: IN%"bilver!alex at uunet.uu.net"
More information about the Comp.std.c
mailing list