Tech Off Thread

1 post

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

C++ constant int, float and double

Back to Forum: Tech Off
  • User profile image
    cro

    I would like to have a sample C++ application (console) that have a bad behavior if you use int, float or double constant.

    Somethings like this, but that works :

    double a = b * c * 2;
    double a = b * c * 2.0f;
    double a = b * c * 2.0;

    result :

    16
    16.1234;
    16.4567;

    THOSES RESULT ARE PURELY HYPOTETIC !

    It's only to show what kind of application and bad behavior that I am looking for.

    Thanks.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.