18 years ago
Highlights
18 years ago
You're right. The problem with my original "solution" was that it shouldn't have a ref return. It should be:X func(){ return X(*this);}int main(int argc, char *argv[]){ const X&…
18 years ago
You are not returning a temporary, but a reference to a local variable. Try this: (assuming valid copy constructor)const X& func() { return X(*this); }
18 years ago
20 years, 3 months ago
A simple way would be to reference 'mat3' somewhere beneath your loop (in a print statement or something of the such)There is probably a way to do this in VS, but I don't know t…
20 years, 3 months ago
Latest Activity
See all in DiscussionsYou're right. The problem with my original "solution" was that it shouldn't have a ref return. It should be:X func(){ …
18 years ago
You are not returning a temporary, but a reference to a local variable. Try this: (assuming valid copy constructor)const X& …
18 years ago
A simple way would be to reference 'mat3' somewhere beneath your loop (in a print statement or something of the …
20 years, 3 months ago