iostream and cout

This is a discussion on iostream and cout within the C Programming forums, part of the General Programming Boards category; I've been going through this cool FAQ by AdrianXW, BUT for some reason my compiler doesn't have iostream. I've looked ...

  1. #1
    Cached User mako's Avatar
    Join Date
    Dec 2005
    Location
    Germany.Stuttgart
    Posts
    69

    iostream and cout

    I've been going through this cool FAQ by AdrianXW, BUT for some reason my compiler doesn't have iostream.

    I've looked for it in the #include directory and it's just not there. cout << doesn't work because of this also...

    could it be that iostream is a cpp header file or what am I doing wrong?...

    many thanks,

    mako

  2. #2
    Registered User TactX's Avatar
    Join Date
    Oct 2005
    Location
    Germany.Stuttgart
    Posts
    65
    Yes, iostream is purely C++.

  3. #3
    Rabble Rouser Slacker's Avatar
    Join Date
    Dec 2005
    Posts
    116
    What compiler are you using? Most C compilers are also C++ compilers, and they use a switch or file extension to determine how to compile and link.

  4. #4
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Well, you posted your question on the C board -- C language does not support iostream! Use stdio.h instead.

  5. #5
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    I've looked for it in the #include directory and it's just not there.
    Check for iostream.h, which is what older compilers have.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  6. #6
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Check for iostream.h, which is what older compilers have.
    That would still make it C++, albeit an older standard.

  7. #7
    Cached User mako's Avatar
    Join Date
    Dec 2005
    Location
    Germany.Stuttgart
    Posts
    69
    thx for all the replies. I use mingw gcc in eclipse with makefiles. And there's no iostream or .h so I figure it's just a c ompiler, which I'm cool with.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why can't I overload of iostream operator?
    By Mathsniper in forum C++ Programming
    Replies: 3
    Last Post: 04-05-2006, 08:20 AM
  2. how do you repeat cout statements?
    By findme in forum C++ Programming
    Replies: 10
    Last Post: 11-21-2005, 10:34 AM
  3. iostream vs iostream.h
    By LegendsEnd in forum C++ Programming
    Replies: 16
    Last Post: 03-27-2004, 06:14 PM
  4. .eof will not work in iostream
    By Jessica in forum C++ Programming
    Replies: 8
    Last Post: 10-25-2002, 12:10 AM
  5. iostream & hex?
    By dmlx90 in forum C++ Programming
    Replies: 0
    Last Post: 05-22-2002, 11:51 PM

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