Errors, bugs, questions - page 2703

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
Shouldn't there be an error when compiling this code that the function should return a value?
Shouldn't there be an error when compiling this code that the function should return a value?
it should
Most likely, you didn't access this method and the compiler didn't include this part of the code in the executable file
should
Most likely, you haven't accessed this method and the compiler hasn't included this code fragment into the executable file.
But if I designate the Test() function in the same class and implement it that way:
int CMapManager::Test() { }
The error will occur, although I haven't accessed this function anywhere either.
But if I designate Test() function in the same class and implement it this way:
An error will occur, even though I haven't accessed this function anywhere either.
because this method is not a template - there is no template
a template is essentially a macro substitution, in which the compiler inserts the necessary types when detecting calls of functions(class methods)
this "substitution" will "generate" functions with specific data types
this is approximately how it works
because this method is not a template - there is no template
a template is essentially a macro substitution, in which the compiler will substitute the necessary types when detecting function(class method) calls
this "substitution" will "generate" functions with specific data types
this is approximately how it works
That's roughly how I see it, thank you. But the question is why at the stage "before the generation" we shouldn't inform that the int value should be returned?
After all, regardless of the generated functions, all of them will return a value of int type.
That's roughly how I see it, thank you. But, the question is different, why at the stage "before generation" don't we inform that we need to return int value?
After all, regardless of generated functions, all of them will return a value of int type.
You and I have gone for the second run - we will give the same answers to the same question )))
no call - no pattern application, that's it - that's how it works
)))
sketch the script and try it out
like this:
it compiles like this, then open your comments - there will be errors
I missed something somewhere, in general I am looking for a catch in such a code:
2020.04.12 01:40:16.652 tst (EURUSD,H1) 0.00000 1.00000
2020.04.12 01:40:16.652 tst (EURUSD,H1) 2.00000 3.00000
2020.04.12 01:40:16.652 tst (EURUSD,H1) 4.00000 5.00000
2020.04.12 01:40:16.652 tst (EURUSD,H1) 6.00000 7.00000
2020.04.12 01:40:16.652 tst (EURUSD,H1) 8.00000 9.00000
2020.04.12 01:40:16.652 tst (EURUSD,H1) 10.00000 11.00000
2020.04.12 01:40:16.652 tst (EURUSD,H1) 12.00000 13.00000
2020.04.12 01:40:16.652 tst (EURUSD,H1) 14.00000 15.00000
2020.04.12 01:40:16.652 tst (EURUSD,H1) 16.00000 17.00000
2020.04.12 01:40:16.652 tst (EURUSD,H1) 18.00000 19.00000
it's confusing that it's so easy to create a two-dimensional array and assignment without copy constructor description works out of the box
what in my code may not work correctly?
NO DECOMPILING ALLOWED!
Just in case, is there any way to make theStringToCharArray function copy bytes without conversions? Tried all CP_XXX, none of them provide 1-to-1 copies in general case. Here's an example:
The way to get 0x81 byte can be different, here it's set "head-on" for simplicity. If you don't use manual byte-by-by-byte copying (as in the unmentioned line), the StringToCharArray function converts byte 129 (0x81) to 63.
So far I had to replace StringToCharArray with a loop, but maybe there is a secret CP_XXX?
Just in case, is there any way to make the StringToCharArray function copy bytes without conversions? Tried all CP_XXX, none of them provide 1-to-1 copies in general case. Here's an example:
The way to get 0x81 byte can be different, here it's set "head-on" for simplicity. If you don't use manual byte-by-by-byte copying (as in the unmentioned line), the StringToCharArray function converts byte 129 (0x81) to 63.
I had to replace StringToCharArray with a loop for now, but maybe there is a secret CP_XXX?
2020.04.12 15:57:37.812 tst1 (EURUSD,H1) 129 32 116 101 115 116