C++

From LPTMS Wiki
Revision as of 12:27, 11 February 2011 by Roux (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Pointers handling

pointers are not always easy to handle, particularly for destruction, memory management... There exists some solutions provided by boost




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>