1 C++ 1 C++ Primer C++ (giantchen@gmail.com) 2012-7-11 Creative Commons - - 3.0 Unported (cc by-nc-nd) http://creativecommons.org/licenses/by-nc-nd/3.0/ 1 C++ 2009 Stanley Lippman C++ C++ Java/C#/Python C++ C++ 1 C++ 2 3 C++ 10% 10% 4 (GC) C++ 5 C++ Java C# 1 http://shootout.alioth.debian.org/ Google https://days2011.scala-lang.org/sites/days2011/files/ws3-1-hundt.pdf 2 C++ Bjarne Stroustrup C++ http://www2.research.att.com/~bs/applications.html 3 C++ http://aristeia.com/talknotes/misra_day_2010.pdf 4 Milo Yip C++ ( Unreal/Source) ( Havok/FMOD) C++ http://www.cnblogs.com/miloyip/archive/2010/09/17/behind_cplusplus.html 5 C++ (clean up) http://blog.csdn.net/myan/article/details/1906
1 C++ 2 Bjarne Stroustrup C++ (system programming) 6 (infrastructure) C++ 7 Herb Sutter 8 C++ (efficiency) (flexibility) 9 (abstraction) (productivity) 10 C++ is about efficient programming with abstractions C++ 11 C++ 12 13 & inline int find_longest(const std::vector<std::string>& words) { // std::max_element(words.begin(), words.end(), LengthCompare()); } CPU C++ (memory layout ) (locality of reference) 14 (memory hierarchy) Scott Meyers PPT CPU Caches and Why You Care Herb Sutter PPT Machine Architecture 15 6 CPU 7 Software Development for Infrastructure. http://www2.research.att.com/~bs/computer-jan12.pdf 8 Herb Sutter C++ and Beyond 2011 Why C++? http://channel9.msdn.com/posts/c-and-beyond-2011-herb-sutter-why-c 9 (just-in-time compilation) 10 Stan Lippman Linux 1970 C++ C++ 11 Ulrich Drepper Stop Underutilizing Your Computer SIMD http://www.redhat.com/f/pdf/summit/udrepper_945_stop_underutilizing.pdf 12 Technical Report on C++ Performance http://www.open-std.org/jtc1/sc22/wg21/docs/18015.html 13 Scott Meyers Effective C++ in an Embedded Environment http://www.artima.com/shop/effective_cpp_in_an_embedded_environment 14 std::list O(1) std::vector O(N) std::vector (compact) std::vector std::list http://ecn.channel9.msdn.com/events/goingnative12/gn12cpp11style.pdf std::vector 15 http://aristeia.com/talknotes/accu2011_cpucaches.pdf http://www.nwcpp.org/downloads/2007/machine_architecture_-_nwcpp.pdf
2 C++ 3 / GC 16 C++ C Java Python TIOBE C++ Java 2 C++ C++ (features) Google 17 C++ C++ 18 19 C++ C++ Bjarne Stroustrup The C++ Programming Language Stan Lippman C++ Primer 20 C++ C++ Primer C++ C++ Primer C++ Primer 21 Barbara Moo 16 Bjarne Stroustrup Abstraction and the C++ machine model C++ Java http://www2.research.att.com/ bs/abstraction-and-machine.pdf 17 50% http://blog.csdn.net/myan/article/details/3144661 18 Java C# Python 19 C++ 20 C++ Primer 3/e http://jjhou.boolan.com/cpp-primer-foreword.pdf 21 Bjarne Stroustrup Programming Principles and Practice Using C++ use only the 4th edition.
2 C++ 4 2.1 C++ Primer C++ Huffman C++ C++ (syntax) (semantics) C++ STL C++ 22 C++ C++ 23 1 C++ C++ Primer C C++ C++ C C++ Primer C++ C++ 24 25 C++ 900 C++ Primer C++ std::string std::vector std::string 22 C++ Primer 4/e 23 21 Accelerated C++ C : C ( 2 ) 24 iostream locale/facet 25 Stanley Lippman Virtual base class support wanders off into the Byzantine... The material is simply too esoteric to warrant discussion...
2 C++ 5 C++ Primer 10.4.2 10.6 15.9 Liskov C++ Primer 2005 2003 C++ 26 C++ 2011 C++11 TR1 27 C++11 28 C++ C++ Primer C++ GNU G++ Visual C++ 29 C++ C++ C++ C++ 30 C++ C++ C++ C C++ C++ C++ 31 32 C++ 26 1998 C++ 27 TR1 2005 C++ bind/function 28 C++ Primer C++11 29 G++ Linux Unix Visual C++ Windows C++ Intel C++ Linux G++ Windows Visual C++ 30 Cfront http://www.softwarepreservation.org/projects/c_plus_plus 31 C++ http://stackoverflow.com/questions/3931312 32 G++ 4.x 32-bit 64-bit 64-bit C++ Visual C++ 2010 Express Visual C++ 6.0
2 C++ 6 C++ 33 C++ (module) (package) C C++ 34 vector<t> vector int std::string 3+2*4 35 calculate() + Node 3 * NumberNode BinaryNode 2 4 AddNode MultiplyNode BinaryNode<std::plus<double> > BinaryNode<std:: multiplies<double> > BinaryNode<T> 33 C++ C++ 34 std::vector<int> 35 Packrat http://www.relisoft.com/book/lang/poly/3tree.html
3 7 Node NumberNode BinaryNode<T> 15.8 Handle C++ C++ C++ 36 C++ C++ 37 Google protobuf leveldb PCRE C++ muduo Chromium Google C++ STL Boost C++ C++ C Java C++ 3 C++ C++ Primer C++ Effective C++ 38 C++ C++ Primer C++ 36 http://blog.csdn.net/myan/article/details/3247071 37 38 Scott Meyers
3 8 Effective C++ Effective C++ C++ C++ C++ (override) 39 class 40 C++ idiom RAII 41 TCP RAII C++ 5 42 C++ delete C++ Effective C++ 3 C++ C 43 TR1 bind/function 44 Stephan T. Lavavej PPT TR1 45 46 39 Andrew Koenig Teaching C++ Badly: Introduce Constructors and Destructors at the Same Time http://drdobbs.com/blogs/cpp/229500116 40 std::string std::vector boost::shared_ptr class 41 (heap) 42 TR1 shared_ptr weak_ptr boost::scoped_ptr 43 Java 7 try-with-resources Python with C# using 44 function/bind http://blog.csdn.net/myan/article/details/5928531 45 http://blogs.msdn.com/b/vcblog/archive/2008/02/22/tr1-slide-decks.aspx 46
3 9 STL 47 C++ Primer C++ C++ 48 concept model refinement C++ STL STL 49 C++ type traits C++ 50 C 51 C++ C++ C++ Effective C++ 1 31 C++ C/C++ 52 35 class 43 pimpl C++ 47 Matthew Austern 48 Herb Sutter 49 Iterator http://jjhou.boolan.com/programmer-3-traits.pdf 50 C++ http://blog.csdn.net/myan/article/details/1920 51 C++ 52 http://www.math.pku.edu.cn/teachers/qiuzy/technotes/expression2009.pdf
4 10 56 swap() swap() 59 #include using 73 by value by reference 76 vector 79 value smart pointer 5 (entity) 6 8 9 22 32 class value class base class trait class policy class exception class 33 class 37 public 57 class namespace C++ Google C++ 53 LLVM 54 4 2010 11 PDF C++ 15% 55 5 C++11 56 TR1 TR1 53 http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#exceptions 54 http://llvm.org/docs/codingstandards.html#ci_rtti_exceptions 55 10 11 lower_bound upper_bound 56 Scott Meyers C++11 http://www.artima.com/shop/overview_of_the_new_cpp
4 11 URL C++ [CCS] soxxxxxx http://stackoverflow.com/questions/xxxxxx 4.1 http://www.informit.com/store/product.aspx?isbn=0201721481 http://book.douban.com/subject/10944985/ PDF http://chenshuo.com/cp4/ https://github.com/chenshuo/documents/downloads/learncpp.pdf giantchen@gmail.com http://weibo.com/giantchen 2012 5