Is there a version of the iostream header that works with regular c? I'm forced to program in C for my college class but i've been programming in c++ using iostream that not using it is gonna be a pain in the rear.
Printable View
Is there a version of the iostream header that works with regular c? I'm forced to program in C for my college class but i've been programming in c++ using iostream that not using it is gonna be a pain in the rear.
No, C doesn't use iostream. You will have to get input like this:
Code://define a file pointer
FILE *fptr = NULL;
//open a file in read mode
fptr = fopen("C:\\filename.txt","r");
//validate that the file opened properly
if(fptr == NULL) exit(1);
//Scan text file with fscanf(...
//scan binary file with fread(...