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()...")
 
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
testing c++ source display:
== Reference websites ==
* [http://en.wikipedia.org/wiki/C++ Wikipedia]
* [http://www.cppreference.com/wiki CppReference]
* [http://www.cplusplus.com Cplusplus] -- [http://www.cplusplus.com/reference Reference]


<source lang="cpp">
===Pointers handling===
template<typename T> class B
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,...)
private:
* [http://www.boost.org/doc/libs/release/libs/ptr_container Pointer containers] (vector, list, deque...)
  T t;
public:
  B(T const& _t) : t(_t) {};
  T value() const {return t;};
};


int main()
==Miscellaneous==
{
* [[Using a hashmap]]
  B<int> b(2);
* [http://wwwasd.web.cern.ch/wwwasd/cernlib/cfortran.html Interfacing C/C++ and Fortran]
}
* [[pointer to member function]]
</source>
* [[Interfacing C++ and Python]]
* [[OpenMP_and_Multithreading#C++|OpenMP in C++]]
* [[128 bits integers with gcc]]
* [[low-level integer routines with gcc]]

Latest revision as of 17:22, 11 April 2012

Reference websites

Pointers handling

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

Miscellaneous