- Your function returns a copy of its argument. Which means, it has to call itself to assign the value to the copy. Infinite recursion.
How To Ask Questions The Smart Way. 2004
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken.It is almost always your code.
- When you do a a = (b = c), the result should be a reference to b, so you can do the a = b. Return a pointer of this.
- Your function returns a copy of its argument. Which means, it has to call itself to assign the value to the copy. Infinite recursion.
How To Ask Questions The Smart Way. 2004
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken.It is almost always your code.
- When you do a a = (b = c), the result should be a reference to b, so you can do the a = b. Return a pointer of this.
The "a = b = c;" will be done like this if it work normally: set c to b, return c, set c to a, done.
1. don't know what do you really want to mean, but the code pass a reference of "_a" to return value, I never see any other compiler of other languages will treat "_a" as "this" or the variable which owned the function body, such as c++ or c#, this operator function will be just a set function never should be recursive. If you define it as "void operator=( aaa &_a);" then you will be not able to set "a = b = c;" but only "b = c;", "a = b;" could be done.
2. Dude, have you ever try these code on your Meta Editor? Pointer can not be applied to a "struct".
3. Thanks for reply, but you are not helping.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use