Programming in C++

9/20/99


Click here to start


Table of Contents

Programming in C++

What is an Expression in C++?

Operators can be

Some C++ Operators

Precedence

Associativity

Evaluate the Expression

Parentheses

Assignment Operator Syntax

What value is stored?

What is stored?

What is stored?

Type Casting is Explicit Conversion of Type

<iostream.h> is header file

No I/O is built into C++

>> is a binary operator

<< is a binary operator

Some Expressions

What values are stored?

Values were rounded to 2 decimal places

Functions

What is in a block?

Function Calls

Parts of a Function

What is in a heading?

More about functions

Where are functions?

HEADER FILE FUNCTION EXAMPLE VALUE OF CALL

Write C++ Expressions for

Manipulators

Insertion Operator ( << )

Output Statements

setprecision(n)

What is exact output?

OUTPUT

setw(n)

What is exact output?

OUTPUT

Using setf( )

cout.setf( ) statements

More examples

Program with several functions

Value-returning functions

Rest of Program

A void function call stands alone

A void function does NOT return a value

Author: Sylvia Sorkin

Email: ssorkin@essex.cc.md.us

Home Page: http://www.essex.cc.md.us/Essex/People/ssorkin/index.html

Download presentation source