Beginning C Programming - Part 50 - Reading Data From A File

preview_player
Показать описание
We chatter on this Discord server:

The return 0; at the end of main has vanished :) Oops.

Series of videos on programming in C

I've added ads, as it seems it's the only way to appear in searches!
Рекомендации по теме
Комментарии
Автор

Great tutorials. Just make sure to add fclose(pFile) to each of those functions. It was left out of the video.

ZeroElectronic
Автор

sadly this all got real confusing real fast.

HamedAdefuwa
Автор

Or when you load a file you could always say:
FILE *fp = NULL;
fp = fopen(“myData.bin”, “rb”);
if (!fp) // shortcut for if it’s NULL
{
printf(“myData.bin could not be found\n”);
}
else
{
printf(“file has been found\n”);
fclose(fp);
}
And so on with the code

jackstonebrooks