C++: Difference between revisions

From LPTMS Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 4: Line 4:
* [http://www.cplusplus.com Cplusplus] -- [http://www.cplusplus.com/reference Reference]
* [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
* [http://www.boost.org/doc/libs/release/libs/smart_ptr/smart_ptr.htm Smart pointers] (shared_ptr,...)
* [http://www.boost.org/doc/libs/release/libs/smart_ptr/smart_ptr.htm Smart pointers] (shared_ptr,...)
* [http://www.boost.org/doc/libs/release/libs/ptr_container Pointer containers] (vector, list, deque...)
* [http://www.boost.org/doc/libs/release/libs/ptr_container Pointer containers] (vector, list, deque...)
===Hashmap===
* [[Using a hashmap]]





Revision as of 14:12, 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

Hashmap



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>