Errors, bugs, questions - page 1119
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
Compilation error: the compiler thinks I'm passing a pointer by reference
If I write f1( A* const a ), everything compiles well, but I don't write f2( const int a ) and in case of f2( int a ) the compiler gets it right
then there should be an error in f2( a2 ) tooI don't want to post the whole code and .set to it here, but I can send it somewhere.
Can't delete a const A* pointer
At first sight it seems logical - delete calls destructor ~A(), and it cannot be const (***)
BUT then it would be impossible in principle to delete the object in the following example
void f() { const A a; }
because the destructor, which cannot be const, is still called when exiting f() and therefore the (***) doctrine does not work
Besides, the C++ compiler does not prevent delete( a ), even if the argument is declared as const A * (the destructor cannot be declared as const, because it is called for any, including non-const, objects)
no longer counts for posts(
no longer counts for posts(
Oh well.
I checked the post, it didn't increase. Maybe there's some clever improved formula...
Forum on trading, automated trading systems and testing trading strategies
Interesting & Humorous
newdigital, 2014.04.09 14:23
Should be banned from thinking - it's offensive!
The lines are knitted into a poem,
The sea licks the dry land.
Children poop in the potty,
♪ Adults poop in their souls ♪
I checked my post here - it hasn't increased. Maybe there's some clever improved formula...
Stopped counting rating for forum posts (