learn c++ programming language

27
The C++ Language www.myassignmenthelp.n et

Upload: stevejohnson

Post on 28-Sep-2015

29 views

Category:

Documents


4 download

DESCRIPTION

Start Developing Softwares by Learning C++ Programming language with www.myassignmenthelp.net

TRANSCRIPT

Slide 1

The C++ Language www.myassignmenthelp.net1Overview of C++

Bjarne Stroupstrup, the languages creatorC++ was designed to provide Simulas facilities for program organization together with Cs efficiency and flexibility for systems programming.Modern C and C++ are siblings

www.myassignmenthelp.net2OutlineC++ basic featuresProgramming paradigm and statement syntaxClass definitionsData members, methods, constructor, destructorPointers, arrays, and stringsParameter passing in functionsTemplatesFriendOperator overloadingI/O streamsAn example on file copyMakefile

3C++ Features

ClassesUser-defined typesOperator overloadingAttach different meaning to expressions such as a + bReferencesPass-by-reference function arguments Virtual FunctionsDispatched depending on type at run timeTemplatesMacro-like polymorphism for containers (e.g., arrays)Exceptions

www.myassignmenthelp.net4Compiling and Linking

A C++ program consists of one or more source files.Source files contain function and class declarations and definitions.

Files that contain only declarations are incorporated into the source files that need them when they are compiled.

Thus they are called include files.

Files that contain definitions are translated by the compiler into an intermediate form called object files.

One or more object files are combined with to form the executable file by the linker. www.myassignmenthelp.net5A Simple C++ Program#include #include using namespace std; int main ( ) {intx, y; cout > x >> y; int sum = x + y; cout > input operator (extractor)