Re: [Dev-C++] I have problems with a typedata en c++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2006-08-26 12:37:54
|
There are no data type longdouble.
There are a data type long double.
Some compilers will support it, some will ignore the long keyword and
treat it as a double. MinGW - the compiler used by Dev-C++ - does support
a long double data type.
You can easily check if a compiler supports it by doing:
if (sizeof(long double) !=3D sizeof(double)) {
std::cout << "Long double supported" << std::endl;
}
Are your program really needing a long double to be numerically stable, or
is the program incorrectly written, resulting in the errors?
Note that when using printf() for emitting a double or long double, the
formatting string differs. If the formatting string is for a double, but
you push a long double, the printout will be completely wrong. Same thing
if the formatting string specifies a long double, but your argument is a
double.
/Per W
On Fri, 25 Aug 2006, Victor Romero wrote:
> Hi, I write to you due to I have some problems with a program.
>
> This program was made for C++, and this program uses many classes.
>
> For this program the typedata that was used is longdoble, somebody have t=
old
> me that
> DevC++ doesn't know this typedata. In order to solve this, a definition w=
as
> made but mi problem still the but mi problem still there.
>
> The program runs right, but the solution=B4s numbers are illogical.
>
>
> --
> Victor Romero V.
>
|