Thread: I don't find function error() in my compiler(IDE)?

  1. #1
    Registered User
    Join Date
    Feb 2010
    Location
    Budapest
    Posts
    26

    Question I don't find function error() in my compiler(IDE)?

    I've downloaded Bjarn Stroustrup's book with the title of Programming Principles and Practice Using C++ not so long. As I keep reading it and do the drills and examples, in the part of exception handling I've come across a function error(), but I haven't been able to call it till now.

    Is it possible that there isn't such a function in my compiler (more exact: IDE).

    My compiler: Dev C++ (Bloodshed Software) As I know this work is coded by a french guy.
    His homepage:Bloodshed Software - Providing Free Software to the internet community

    Bjarn says that he uses Visual C++ compiler.

    Thanks in advance for any usful comment.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Did you notice on the front page that nothing has happened with Dev-C++ since 2005, and that's just a beta? There are better (free) alternatives, like Code::Blocks.

    As to the other, I don't believe there's a standard function called error. Are you sure that's not something that was written as part of the example?

  3. #3
    Registered User
    Join Date
    Feb 2010
    Location
    Budapest
    Posts
    26
    Thanks a lot, tabstop. (:

    Of course, I noticed this sad fact( dev-c++ hasn't been updated since 2005 till now), me too. But there are several site, where many people praise this good compact work, including this site and that's why I choose it to start learning c++ over one year ago. I insist on that little thing and don't let it lose despite descovering more and more lackness.

    As the function error is concerned, probably you are right, this may be just a theoretical discription of the error handling, because I haven't find any such a c-function with that name so far, after thorough searchings on the whole www.

  4. #4
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    Look at pages 139 - 140 in section 5.5.1 the author describes this function and states that in his std_lib_facilities.h header file defines this function (also you might want to look in the book's index).


    Jim
    Last edited by jimblumberg; 02-19-2011 at 12:03 PM.

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Treborh View Post
    Of course, I noticed this sad fact( dev-c++ hasn't been updated since 2005 till now), me too. But there are several site, where many people praise this good compact work, including this site and that's why I choose it to start learning c++ over one year ago. I insist on that little thing and don't let it lose despite descovering more and more lackness.
    The IDE/compiler has no effect on the language. You can learn the language fine and experiment with different IDEs/compilers, like Code::Blocks. Don't let it hinder you!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  2. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  4. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  5. Replies: 5
    Last Post: 02-08-2003, 07:42 PM