
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Another question about casting
there is this code:
and I want to initialize class B with constructor without parameters, but I can't cast SHash structure to constructor SHash(const double)
i.e. i need some casting (SHash) double
In my example, there is a compiler error: '(SHash)' - invalid cast operation
if you write it this way:
Another question about casting
there is this code:
and I want to initialize class B with constructor without parameters, but I can't cast SHash structure to constructor SHash(const double)
i.e. i need some casting (SHash) double
In my example, there is a compiler error: '(SHash)' - invalid cast operation
if you write it this way:
it works this way
but need 0xAAAAAAAAAAAAAAAA initialization for SHash structure - it's some kind of NULL - not getting MD5 hash from test string (i checked)
SHash() constructor seems to be not needed now, but seems to have been needed a few days ago ))) So, at first it wasn't there, then I fixed a compilation error somewhere with this empty constructor, or when comparing structures or during initialization... in general, there is a high probability that.... will be needed although it seems to be a good rule to initialize all variables....
in general, i wish i had a variant or unambiguous - no ))))
it works this way
but need 0xAAAAAAAAAAAAAAAA initialization for SHash structure - it's some kind of NULL - not getting MD5 hash from test string (i checked)
SHash() constructor seems to be not needed now, but seems to have been needed a few days ago ))) So, at first it wasn't there, then I fixed a compilation error somewhere with this empty constructor, or when comparing structures or during initialization... in general, there is a high probability that.... will be needed although it seems to be a good rule to initialize all variables....
in general, i wish i had a variant or unambiguous - no )))
but guess it by yourself?)))
but guess it yourself?))
SHash((double)x)
and guess it yourself?)))
Oh, man, it works!
I think I tried it that way too, I don't know why it didn't work.
Thanks!
bad messed up ((!
Yeah, and where do you get the x in the class constructor?))
Yeah, and where do you get x from in the class constructor?)
the point is not about x) but that there may be a float on the receiving end, just 0.0 is not reliable either
the point is not the x) but that there can be a float on the receiver besides the duble, and specifying just 0.0 is also unreliable
although all this is such a detail... not especially important
the point is not about x) but that there can be a float in the input, just 0.0 is not reliable either.
It doesn't matter what to initialize there, even int - any number to call this constructor
and I chose 0.0 to avoid misprints - any digit, i.e. 0.0. is harder to write and misprint than 123