Thread: Is there a C iostream?

  1. #1
    Registered User
    Join Date
    Sep 2001

    Question Is there a C iostream?

    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.

  2. #2
    Join Date
    Aug 2001
    mming, Game DevelopmentCSR >&<>&2Minimization of boolean functions, PROM,PLA design >&0>&WA, USA guitar, dogsCommercial Aviation >&>>&USAProgramming
    No, C doesn't use iostream. You will have to get input like this:
    //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(...
    I compile code with:
    Visual Studio.NET beta2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. iostream overloaded operators
    By peckitt99 in forum C++ Programming
    Replies: 1
    Last Post: 08-10-2007, 05:32 AM
  2. Drieving from iostream
    By Thantos in forum C++ Programming
    Replies: 8
    Last Post: 06-23-2004, 04:57 PM
  3. iostream & hex?
    By dmlx90 in forum C++ Programming
    Replies: 0
    Last Post: 05-22-2002, 11:51 PM
  4. DJGPP Doesn't include IOSTREAM!!!!!!!!!!!
    By Frenchfry164 in forum Game Programming
    Replies: 12
    Last Post: 10-27-2001, 12:27 PM
  5. << in iostream
    By badman in forum C++ Programming
    Replies: 8
    Last Post: 10-18-2001, 10:19 PM