C++: Difference between revisions

From LPTMS Wiki
Jump to navigation Jump to search
m (Created page with "testing c++ source display: <source lang="cpp"> template<typename T> class B { private: T t; public: B(T const& _t) : t(_t) {}; T value() const {return t;}; }; int main()...")
(No difference)

Revision as of 23:49, 3 February 2011

testing c++ source display:

<source lang="cpp"> template<typename T> class B { private:

 T t;

public:

 B(T const& _t) : t(_t) {};
 T value() const {return t;};

};

int main() {

  B<int> b(2);

} </source>