course content

Course Content

Introduction to C++

#include Directive#include Directive

Preprocessor directives are commands for the preprocessor, which always begin with a sharp sign (#) in the C++ language.

It is just replacing the #include <iostream> line with the contents of a header file called iostream that contains the cout object. If we write the name of the header file incorrectly, there will be an error, which means that we will not be able to get to the cout object.

This example throws an error. This is done on purpose.

cpp

main.cpp

Standard files are attached using angle brackets, but you can also create your own and connect them to your project similarly, using double quotes #include "myFile".

1. What keyword can be used to connect other files and libraries to out program?
2. What symbol allows us to access the preprocessor?

question-icon

What keyword can be used to connect other files and libraries to out program?

Select the correct answer

question-icon

What symbol allows us to access the preprocessor?

Select the correct answer

Section 1.

Chapter 3