Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Dr.Bob's Kylix Kicks
 Borland C++Builder lost+found #2
See Also: C++Builder Papers and Columns

matherr revisited
In the previous installment of lost+found I told you about the change in argument name for _matherr and _matherrl. However, be careful to use the proper namespace. As you know, consultation of the RTL source and <math.h> gave me the insight that since C++ defines an `exception' class in the standard C++ library that there is a name conflict and that the proper declarations for _matherr and _matherrl were:

  int matherr(struct math_exception* e);
  int matherrl(struct math_exceptionl* e);
However, if you never declare that you are using the namespace called `std', you must use:
  int std::matherr(struct math_exception* e);
  int std::matherrl(struct math_exceptionl* e);
to override the standard implementations of matherr and matherrl.

This webpage © 2000-2017 by Bob Swart (aka Dr.Bob - All Rights Reserved.