C++: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Reference websites == | |||
* [http://fr.wikipedia.org/wiki/C++ Wikipedia] | |||
* [http://www.cppreference.com/wiki CppReference] | |||
* [http://www.cplusplus.com Cplusplus] -- [http://www.cplusplus.com/reference Reference] | |||
==Pointers handling== | ==Pointers handling== | ||
pointers are not always easy to handle, particularly for destruction, memory management... There exists some solutions provided by boost | pointers are not always easy to handle, particularly for destruction, memory management... There exists some solutions provided by boost | ||
Line 7: | Line 12: | ||
---- | ---- | ||
quick example of c++ source display: | |||
<source lang="cpp"> | <source lang="cpp"> | ||
template<typename T> class B | template<typename T> class B |
Revision as of 08:59, 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: <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>