Re: [Dev-C++] Buggy standard library?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2004-04-12 14:46:07
|
Since he is complaining about bug in standard library, I'm assuming that
he is using a global object so the constructor should be called after
main() has ended but hopefully before the std library has closed down any
stream support.
/Per W
On Mon, 12 Apr 2004, OROSZI Bal=E1zs wrote:
> Latif Dokter wrote:
> > I am using Dev.C++ 4.9.8.7 When creating a program with class World
> > where World () {} says Hello and ~World() {} says goodbye World
> > TheWorld; when compiled and executed
> > in Ms dos console the program prints hello but doesn't print goodbye I
> > have read that I may have a buggy version of the standard library if so
> > is there a patch if not what is happening and how can I fix it
>
> How about posting the source of your program?
> This works perfectly fine for me:
>
> --
>
> #include <iostream>
>
> using namespace std;
>
> class World
> {
> public:
> =09World() { cout << "Hello" << endl; }
> =09~World() { cout << "Goodbye" << endl; }
> };
>
> World TheWorld;
>
> int main()
> {
> =09World TheWorld2;
>
> =09return 0;
> }
>
> --
> Greetings,
> Bal=E1zs
>
>
>
> -----------------------------
|