C + 1 == C++
ce153c
Introduction2programming
© 2006 NematAllah Ahmadyan.
History
C was designed by Ritchi, Tompson,
Kernighan
It was fast, good & powerful
but program’s maintance was a
nightmare!
Solution: ... Object-Oriented Programming
C++
Object-Oriented
• Polymorphism
• Inheritance
• Encapsulation
Data Abstraction
• Operator overloading
STL { Standard Template Library }
Templates
streams
Don’t Panic, They’ll become clear later!
What is C++ ?
“C++ is a general purpose programming
language with a bias towards systems
programming that
• is a better C,
• supports data abstraction,
• supports object oriented
• programming, and
• supports generic programming.”
• By Bjarne Stroustrup
Hello, World & ...
1. #include
2. #include
3. #include
4. using namespace std;
5. int main(){
6. cout > x ; }
4. if ( x == 1 ){
5. y = f(3); C++ is very similar to C
6. }else{ C is a mother nature!
7. y = f(5); To all other language.
C++, Java even Matlab!
}
Further readings
A Brief Look at C++
• Paper by Bjarne Stroustrup
Addison Wesley - C++ Common Knowledge
Advance Programming [Java] course ce244
• Lecturer: Ramtin Khosravi Ph.D
• Object-Oriented Programming
Books/Ebooks
K&R C Kernighan,Ritchie [ designers of C ]
The C++ Programming Language 3rd Ed.
• Bjarne Stroustrup [ designer of C++ ]
C Primer / C++ Primer
C++ FAQ/ C++ FAQ Lite
Dietel & Dietel C/C++/VC++/.NET
• How to program series
Thinking in C++ Vol 1&2
Effective C++ Vol 1&2
McGraw-Hill - C & C++ Programmers Reference
Ansi/ISO C++
Numerical Recipes in C [ cambridge ]
Scientific Calculation [ MathLab ] [ math department ]