INTRODUCTION TO C++
Function body
2 PARTS -Declaration -Executable Statements
Computer Program
A program has to be written using a programming language before a computer can execute it.
Programming Language
A vocabulary and set of grammatical rules
ANSI
AMERICAN NATIONAL STANDARD INSTITUTE
&&
AND
Computer Program
An algorithm written in a language that a computer can understand
Programming Language
An artificial language
Preprocessor Directives
BEGINNING WITHG #
C++ Language which was based on C Language was developed by
Bjarne Stroustrup at Bell Laboratories IN THE EARLY 1980
C++
Borland C++ Turbo C++ Code Warrior (Mac)
Dennis Ritchie of Bell Laboratories
C Language was developed IN 1970
Second - generation Language (Low Level Language)
It must be converted into machine-readable form before running it on a computer.
<<
LESS THAN
!
NOT
OOP
OBJECT ORIENTED PROGRAMMING
||
OR
Comments
SUPPLEMENTARY INFORMATION
Computer Program
The implementation
Function main
beginning of the main function
double
bigger number or real number
Block Comment
block of statements /* and ends with */.
First - generation Language (Machine Language)
coded in 0s and 1s.
American National Standards Institute (ANSI)
developed a standard of consistency for C and C++ programming.
int
integer
char
letter ,number or symbols have single quote
float
real numbers
string
series of characters
Preprocessor
- PRIOR TO ITS COMPILATION
Second - generation Language (Low Level Language)
- converted into machine-readable form before running it on a computer.
Third - generation Language (High Level Language)
- design to be easier to understand for the user - includes named variables and structured programming.
Second - generation Language (Low Level Language)
- form of assembly language -can be fairly easily written or read by a programmer.
Fourth - generation Language
- is designed to be closer to natural language than a 3GL.
Third - generation Language (High Level Language)
- uses a compiler to covert the statements
First - generation Language (Machine Language)
-Portability became a problem - difficult to code and even more difficult to debug.
Executable Statements
-are translated into machine language
Second - generation Language (Low Level Language)
-has major speed advantages - difficult to use effectively in large applications.
Variables
-identifiers that can store a changeable value. -different in data type
Fourth - generation Language
-specific purpose in mind - development of commercial business software.
Fourth - generation Language
-used to access databases - designated to be used by end user and to develop applications quickly.
DECLARATION
-what memory cells are needed in the function.
>>
GREATER THAN
bool
true or false
Line Comment
two forward slashes //