Think this will do the job
Code:
/*
Created By: TJRAK
Title: printcode.c
*/
#include <stdio.h>
#include <stdlib.h>
void main()
{
FILE *indt;
char getdata[100];
if ( (indt = fopen("printcode.c", "r"))==NULL)
printf("Could not open input file");
else {
while(!feof(indt)) {
fgets(getdata,100, indt);
puts(getdata);
}//end while
fclose (indt);
}//end else not file open error
}
Last edited by TJRAK; Apr 21, 2005 at 03:36 PM.
There is no wrong or right, only consequencies to action
"It is the duty of man to make his knowledge so complete in life, so as to make it impossible for any other to take advantage of him" - Marcus Garvey