fileio question

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

what is fioGets()? i never heard of it. why donr you use fwrite() or fread()? thats the best way to program for C. if thats what your looking for.

example
////////////////////////////////////

#include <stdio.h>

int main()
{
FILE *fopen(), *in_file;
char line[81];

in_file = fopen("text.txt","r");
if(in_file == NULL)
{
//error
exit();
}
while(fgets(line, 81, in_file) != NULL)
puts(line);
fclose(in_fine);
return 0;
}

//////////////
btw you should really check out GameDev.net
Post Reply