Date: Mon, 20 Oct 1997 09:05:44 +0200 (MET DST) From: Miguel Murillo To: Erik Max Francis cc: djgpp AT delorie DOT com Subject: Re: A really simple program In-Reply-To: <3442DE31.5A9DD845@alcyone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk A very bad program: ------------------- #include #include int main() { FILE *fd; int i = 0; char cad[100]; system("ls *.c > __tmp"); /* UNIX : system("ls *.c > __tmp");*/ fd =fopen("__tmp","r+"); fscanf(fd,"%s",&cad); while(!feof(fd)) { printf("file(%d) = %s\n",i,cad); i++; fscanf(fd,"%s",&cad); } } Good Luck! ______________________________________________________________________________ |\\/\/\/\/\/| _____________ | | | / \ | Miguel Murillo | | | Elvis is | | mmurillo AT ideafix DOT cps DOT unizar DOT es | __ __ | | dead ! | | Voice: +34-976-761000 ext. 5052 | | | | | | | | | Fax: +34-976-761882 C\ |0 | |0 | /O | bart. | | | "" _ "" | \_ __________/ | Laboratorio de Investigacion en | | // | TEcnologias de la Combustion (CSIC) \'-----'/ --' | _____/-----\_____ | Computer:bart.cps.unizar.es / | | \ | (155.210.32.114) ____________________________________|_________________________________________ Linux: The choice of a GNU generation "My opinions are my own, and I've get *lots* of them!"