actually, i wanna implement a matrix class. and i also want to enable the member function to initialize the buffer where the data stores.
i ve considered two means, one is overload function, another is initialization list.
but it seems not possible for doing that as i hoped
could anyone provides me a little advice
thanks alot
Code:template<typename T> class Mat{ public: // .... Mat(); ~Mat(); private: T ** mem; } int main(void) { Mat a = { {1,2,3}, {2,3,4}}; // or Mat a({1,2,3},{2,3,4}); return 0; }[



LinkBack URL
About LinkBacks



