korzystam z czegos takiego :
Kod: Zaznacz cały
#include <stdio.h>
int main()
{
FILE * pFile;
char string [100];
pFile = fopen ("myfile.txt" , "r");
if (pFile == NULL) perror ("Error opening file");
else {
fgets (string , 100 , pFile);
puts (string);
fclose (pFile);
}
return 0;
}