Programming with C++
 Text book and reference
 C++ introduction
 An example program
References
 Textbook
For C, find by yourself.
Bruce Eckel, Thinking in C++, second edition, Prentice
Hall, China Machine Press.
The second edition of the book (download).
 Reference
B.Stroustrup, The C++ Programming Language (Fourth
Edition), Higher Education Press, originally published
by Pearson Education.
Course scope
 C++98/C++03.
 First as an internal standard.
 STL included.
 C++11
 C++14
 C++17
 C++20
If compared with C
 Like any human language, C++
provides a way to express
concepts. If successful, this
medium of expression will be
significantly easier and more
flexible than the alternatives as
problems grow larger and more
complex
Feature of C++
 Reasons why C++ is so complex:
 Compatible with C
 static type system
 pursue the highest performance
 Drawbacks:
 Difficult to learn
 Not suitable to develope enterprise managerment
software
Application Examples
 Adobe: Photoshop,Illustrator, Acrobat…
 Maya
 Autodesk
 Amazon.com
 Google
 HP:C,C++,Fortran compilers, …
 IBM:OS/400
 Intel: compilers and optimizers
 Microsoft: Windows XP,NT,Office,IE,VC…
C# compiler
 MySQL
 DOOM III
 KDE
Methodology
 Understand the organization of the book :
 avoid the drawbacks of C ;
 More effective programming;
 Understand the features of the book
 detailed, toy examples, native writing style
 grasp the main idea, omitting the trivial details.
 Listen, read and program (question)
C++ development environment(linux)
 Editor + Compiler
 Editors: gedit, tilde, …
 Compilers: gcc, clang.
 IDE
 VS code
 QtCreator
 Eclipse(CDT)
 Kdevelope
 Codelite, CodeBlocks
#include <string>
#include <iostream>
using namespace std;
int main()
{
cout << "hello worldn";
return 0;
}
Build procedure
 To verify whether g++ has been installed.
 g++ --version
 g++ test.cpp
 Don’t use gcc
 ./a.out

COURSE INTRODUCTION TO C++ PROGRAMMING LANGUAGE

  • 1.
    Programming with C++ Text book and reference  C++ introduction  An example program
  • 2.
    References  Textbook For C,find by yourself. Bruce Eckel, Thinking in C++, second edition, Prentice Hall, China Machine Press. The second edition of the book (download).  Reference B.Stroustrup, The C++ Programming Language (Fourth Edition), Higher Education Press, originally published by Pearson Education.
  • 3.
    Course scope  C++98/C++03. First as an internal standard.  STL included.  C++11  C++14  C++17  C++20
  • 4.
    If compared withC  Like any human language, C++ provides a way to express concepts. If successful, this medium of expression will be significantly easier and more flexible than the alternatives as problems grow larger and more complex
  • 5.
    Feature of C++ Reasons why C++ is so complex:  Compatible with C  static type system  pursue the highest performance  Drawbacks:  Difficult to learn  Not suitable to develope enterprise managerment software
  • 6.
    Application Examples  Adobe:Photoshop,Illustrator, Acrobat…  Maya  Autodesk  Amazon.com  Google  HP:C,C++,Fortran compilers, …  IBM:OS/400  Intel: compilers and optimizers  Microsoft: Windows XP,NT,Office,IE,VC… C# compiler  MySQL  DOOM III  KDE
  • 7.
    Methodology  Understand theorganization of the book :  avoid the drawbacks of C ;  More effective programming;  Understand the features of the book  detailed, toy examples, native writing style  grasp the main idea, omitting the trivial details.  Listen, read and program (question)
  • 8.
    C++ development environment(linux) Editor + Compiler  Editors: gedit, tilde, …  Compilers: gcc, clang.  IDE  VS code  QtCreator  Eclipse(CDT)  Kdevelope  Codelite, CodeBlocks
  • 9.
    #include <string> #include <iostream> usingnamespace std; int main() { cout << "hello worldn"; return 0; }
  • 10.
    Build procedure  Toverify whether g++ has been installed.  g++ --version  g++ test.cpp  Don’t use gcc  ./a.out