char* fgets(char* cpBuffer, int iMaxRead, FILE* qpStream);
#include <cstdio>
int main()
{
char* cpFileName = "XoaX.txt";
FILE* qpFile = fopen(cpFileName, "r" );
char caBuffer[50];
// Read in the first and only line of text
char* cpReturn = fgets(caBuffer, 50, qpFile);
if (cpReturn) {
printf("Read in: %s\n", caBuffer);
}
fclose(qpFile);
return 0;
}
© 20072024 XoaX.net LLC. All rights reserved.