Is there a C iostream?

This is a discussion on Is there a C iostream? within the C Programming forums, part of the General Programming Boards category; Is there a version of the iostream header that works with regular c? I'm forced to program in C for ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    1

    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
    Anti-Terrorist
    Join Date
    Aug 2001
    Location
    mming, Game DevelopmentCSR >&<>&2Minimization of boolean functions, PROM,PLA design >&0>&WA, USA guitar, dogsCommercial Aviation >&>>&USAProgramming
    Posts
    742
    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(...
    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, 06:32 AM
  2. Drieving from iostream
    By Thantos in forum C++ Programming
    Replies: 8
    Last Post: 06-23-2004, 05:57 PM
  3. iostream & hex?
    By dmlx90 in forum C++ Programming
    Replies: 0
    Last Post: 05-23-2002, 12:51 AM
  4. DJGPP Doesn't include IOSTREAM!!!!!!!!!!!
    By Frenchfry164 in forum Game Programming
    Replies: 12
    Last Post: 10-27-2001, 01:27 PM
  5. << in iostream
    By badman in forum C++ Programming
    Replies: 8
    Last Post: 10-18-2001, 11:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21