I extract from the file, and when I read it, it takes it line by line and prints it
what I want for sure, I want the char array to contain all the characters in the file and print it once,
this is the code i
if(strcmp(str[0],"@")==0)
{
FILE *filecomand;
char line[100];
int lcount;
if((filecomand = fopen(str[1], "r")) == NULL)
{
printf("Error Opening File.\n");
}
lcount=0;
int i=0;
while( fgets(line, sizeof(line), filecomand) != NULL ) {
}
fclose(filecomand);
source
share