I think this is good, I was just going to post last night a suggestion for a forum thats less restrictive, but at the last minute I closed out of Internet Explorer.
(Okay so I closed out of the wrong window by accident and was too mad at myself to retype it.)
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
|