Download presentation
1
Introduction to C++ Programming Language
Chapter-01 Introduction to C++ Programming Language
2
C++ History 1972 : Dennis Ritchie at Bell Labs designs C and 90% of UNIX is then written in C Late 70’s : OOP becomes popular Bjarne Stroustrup at Bell Labs adds features to C to form “C with Classes” 1983 : Name C++ first used 1998 : ISO/ANSI standardization of C++
3
Three C++ Program Stages
myprog.cpp myprog.obj myprog.exe SOURCE OBJECT EXECUTABLE written in machine language C++ via compiler via linker other code from libraries, etc.
4
Translating a source file into an executable file
Source Code is entered with a text editor by the programmer. Source Code Preprocessor #include <iostream.h> void main(void) { cout<<“Hello World”; } Modified Source Code Compiler Object Code for other functions Object Code Linker Translating a source file into an executable file Executable Code
5
Running a Program Output Program Data Computer
6
C++ Program Translation
Data for C++ Program Compile Execute C++ Compiler Machine-Language Instructions Computer Execution of Machine-Language Instructions Output of C++ Program
7
C++ Program Translation Including Linker
Previously Compiled Helper Programs Data for C++ Program C++ Compiler Computer Machine-Language Instructions Linker Computer Execution of Machine-Language Instructions Output of C++ Program
8
Java Programming Language
achieves portability by using both a compiler and an interpreter first, a Java compiler translates a Java program into an intermediate bytecode--not machine language then, an interpreter program called the Java Virtual Machine (JVM) translates a single instruction in the bytecode program to machine language and immediately runs it, one at a time
9
Java Program Translation
Both Compilation and Interpretation Intermediate Code: “Byte Code” portable low-level code similar to assembly code, but hardware independent invisible to Java programmer Interpreter translates from generic byte code to hardware-specific machine code Java Program Data for Java Program Java Compiler Java Virtual Machine Byte-Code Program Byte-Code Interpreter Machine-Language Instructions Computer Execution of Machine-Language Instructions Output of Java Program
10
Java Program Translation Including Linker
Previously Compiled Helper Programs Data for Java Program Java Compiler Java Virtual Machine Byte-Code Program Byte-Code Interpreter Machine-Language Instructions Linker Computer Execution of Machine-Language Instructions Output of Java Program
11
Learning C++ There are two pieces to learning the C++ world.
First, is learning the C++ language itself. Second, is learning how to use the classes and functions in the C++ standard library.
12
Procedural and Object-Oriented Programming
Procedural programming and object-oriented programming are two ways of thinking about software development and program design.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.