Thread: Out dated header???

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    22

    Out dated header???

    I'm working on learing C++ and I get in error saying that my header is out of data I use #include<iostream.h> and my program is Dev-C++ version 4.9.9.2. Is there a different header that I sould be using I'm doing small game programs to learn that involve 4-5 varables and I get a error saying that int main() is overloaded. Would this be caused by the outdated header?? Thanks

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    iostream.h is old (pre-what, 1995?) and you should <iostream> in its place.

    If the compiler tells you that int main is overloaded, that probably means you have two main programs in one file, which you shouldn't.

  3. #3
    Registered User
    Join Date
    Aug 2007
    Posts
    22
    Ok,thanks we use iostream.h in my class at school but we must be using a hold complire.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Limming View Post
    Ok,thanks we use iostream.h in my class at school but we must be using a hold complire.
    Find another class! ;-)

    Seriously, why would you be using a compiler that is so old that it doesn't have the latest standard compliance - that is the standard that was ratified nearly 10 years ago!

    "Old" may be good for Whiskey and Cognac, but certainly not a good thing on compilers.

    Would you go to a driving school that has 10-15 year old cars as the learner cars?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > Would you go to a driving school that has 10-15 year old cars as the learner cars?
    But "car" years are not the same as "compiler" years.
    Turbo C is like a model T ford, not a ford fiesta
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Registered User
    Join Date
    Aug 2007
    Posts
    22
    Actully we are using Visual Studio so I have no idea why we are still using iostream.h. And this is the only class I can take for C++.

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    VC6 predates the ANSI C++ standard as well.

    Learning pre-ANSI C++ is like learning "ye olde worlde" in English. Sure, it may be useful for historians, but you're not going to be equipped for the modern world.

    Ask your tutor why they're still teaching old C++ a full 10 years after the C++ standard was produced.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  2. Obtaining source & destination IP,details of ICMP Header & each of field of it ???
    By cromologic in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-29-2006, 02:49 PM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM