C ++ program elements

C ++ program elements

declarations, definitions, instructions.

Declarations and definitions

The declaration assigns a name (ID) a specific object, np. constant, variable or function. Object name declarations use the names of standard numeric types and names of the types defined by …

C ++ language elements

C ++ language elements

Elements of the C + language + to:

• identifiers,
• numbers,
• Subtitles,
• signs,
• Keywords,
• reserved words,
• limiters,
• comments.

Identifier

An identifier is any string of letters or numbers starting with a letter. May contain …

Directives for the compiler – C++

Directives for the compiler – C++

Compiler control directives are marked with # and most often precede the program.

The include directive

Directive include gives the name of the module header file, whose content is included in the program. Standard modules containing common language functions can be included …

Modules in C ++

Modules in C ++

Module - part of the program placed in a separate text file. In C ++, a module is split into two physical files:

• header file - with the extension .h,

• implementation file - with the extension .cpp.

The header file contains the declarations of the exported …

C ++ program

C ++ program

Program in C language + + is a function with the standard name main and as a function it can take parameters and return a result. The program consists of:

• compiler directives,

• program header,

• an instruction block.

The program header specifies …