3 ms·
Gadget g = new Gadget(n); That code won't compile unless Gadget has an assignment operator that accepts a pointer, which is, well, not a very common scenario.
by skrebbel 13y ago
Gadget g = new Gadget(n);
That code won't compile unless Gadget has an assignment operator that accepts a pointer, which is, well, not a very common scenario.
Note: I'm not trying to be nitpicky. I really don't understand what you mean when you write that you "want to do this".
Now, I don't know anything about you, but based off your comments in this thread I'm not sure you have a working knowledge of C++.