T
The Cool Giraffe
I've designed a method in the class called Blopp.
class Blopp { void foo (int a = 3, double b = 3.6) {} } ;
The problem is only that when i call the method, the
value of b seems to be truncated, if one believes the
(un?) helpful IDE that pops out an info-note. On it,
the value has been clearly lowered to 3.0!
I went debugger on it and it seems that the actual
value indeed is 3.6, as supposed to. However, when
the helping info-notes give one strange suggestions,
it often implies that _something_ is wrong.
What could be a reason for this kind of behavior,
regarding the pure "C++ code"-wise. Should or need
i to use an "d" after the value to explicitly indicate
the double-ness of it? I didn't expect it to be so,
but then again, i didn't expect the truncation either...
class Blopp { void foo (int a = 3, double b = 3.6) {} } ;
The problem is only that when i call the method, the
value of b seems to be truncated, if one believes the
(un?) helpful IDE that pops out an info-note. On it,
the value has been clearly lowered to 3.0!
I went debugger on it and it seems that the actual
value indeed is 3.6, as supposed to. However, when
the helping info-notes give one strange suggestions,
it often implies that _something_ is wrong.
What could be a reason for this kind of behavior,
regarding the pure "C++ code"-wise. Should or need
i to use an "d" after the value to explicitly indicate
the double-ness of it? I didn't expect it to be so,
but then again, i didn't expect the truncation either...