Difference between revisions of "C++"
From LPTMS Wiki
m |
|||
Line 1: | Line 1: | ||
== Reference websites == | == Reference websites == | ||
− | * [http:// | + | * [http://en.wikipedia.org/wiki/C++ Wikipedia] |
* [http://www.cppreference.com/wiki CppReference] | * [http://www.cppreference.com/wiki CppReference] | ||
* [http://www.cplusplus.com Cplusplus] -- [http://www.cplusplus.com/reference Reference] | * [http://www.cplusplus.com Cplusplus] -- [http://www.cplusplus.com/reference Reference] |
Revision as of 09:01, 8 April 2011
Reference websites
Pointers handling
pointers are not always easy to handle, particularly for destruction, memory management... There exists some solutions provided by boost
- Smart pointers (shared_ptr,...)
- Pointer containers (vector, list, deque...)
quick example of c++ source display:
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); }