Code Blocks C++ Flashcards ionicons-v5-c

#include

Preprocessor Directive

Function

Consists of return type, function name, parameter list, function body.

Stream

a sequence of characters read from or written to an IO device. The term stream is intended to suggest that the characters are generated, or consumed, sequentially over time

NameSpaces

Allow avoiding inadvertent collisions between the names we define and uses of those same names inside a library. All the names defined by the standard library are in the std namespace.

NameSpace side effect

One side effect of the library's use of a namespace is that when we use a name from the library, we must say explicitly that we want to use the name from the std namespace.

Namespace Scope Opperator declaration

The declaration :: that says the compiler should look in the scope of the left-hand operand for the name of the right-hand operand. Thus, std::cin says that we want to use the name cin from the namespace.std

Using DIRECTIVE

like a using declaration, allows us to use the unqualified form of a namespace name. Unlike a using declaration, we retain no control over which names are made visible—they all are. A using directive begins with the keyword using, followed by the keyword namespace, followed by a namespace name.

Header files

We use header.h files to contain declarations for other files, one that may have definitions and the other containing the uses. You identify headers with the suffix .h

Type

Defines a set of possible values and a set of operations(for an object)

Object

Some memory that holds a value of a given type.

Value

A set of bits in memory interpreted accoring to a type.

Variable

A named object.

Declaration

a statement that gives a name to an object.

definition

declaration that sets aside memory for an objet

Parameters

When a function is called, the values (expressions) that are passed in the call are called the arguments or actual parameters

Overload

...

Pointers

...

Data Structures

A data structure creates a new type: Once a data structure is declared, a new type with the identifier specified as structure_name is created and can be used in the rest of the program as if it was any other type. Once declared, product has become a new valid type name like the fundamental ones int, char or short and from that point on we are able to declare objects (variables) of this compound new type, like we have done with apple, banana and melon

Enumerations

We can specify an integer value for any of the constant values that our enumerated type can take. If the constant value that follows it is not given an integer value, it is automatically assumed the same value as the previous one plus one.