Find answers, ask questions, and connect with our <br>community around the world.

Home Forums CPP scientific computing discussion Compiler Flag Reply To: Compiler Flag

  • Nishant

    Member
    September 6, 2022 at 12:02 pm

    Dear Tapas,

    The recent versions of C++ have the ability to perform dynamic implicit type-casting. Therefore, they will allow statements like,
    int a = 3.14
    This is done mainly to make life easy for programmers but as you can see that the value printed on the screen for a is 3 and not 3.14 because a is declared to hold an integer value.

    When you declare a variable with const keyword, C++ will not allow any further re-assignment. Anything declared with const keyword provides read-only access and it can not be overwritten with any new value. Because reassignment is not semantically correct for any const type variable, it will not produce any executable file.

error: Content is protected !!