🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1779

Re: fopen a File Named During Run-time

#1779
From: Doug Gwyn
Date: Wed, 03 Oct 1990 21:11
10 lines
936 bytes
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.
Technical Details
Message-ID: <14006@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!aplcen!haven!adm!smoke!gwyn
References: <37852@ut-emx.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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