blender

Saloni Goyal

Posted on November 8, 2020

Include

In order to use stream I/O, we have to include iostream.

#include <iostream>

The #include directive allows us to -

  • include a file into our application
  • opens up a world of libraries and capabilities

Alt Text

To access anything in the C++ STL, that is all you have to do, just include it. For some other libraries, they might need to be linked as well.

Based on the library, it can be accessed as a -
i) Header only library: like STL, simply write #include to use it
ii) Linked library: needs to be linked with your object files by the linker

Using code that is already written saves us time and testing effort and it allows us to build our application on top of it.

Please leave out comments with anything you don't understand or would like for me to improve upon.

Thanks for reading!

💖 💪 🙅 🚩
blender
Saloni Goyal

Posted on November 8, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Type Safety in Functions
cpp Type Safety in Functions

November 22, 2020

Functions in C++
cpp Functions in C++

November 21, 2020

Keyboard Input
cpp Keyboard Input

November 21, 2020

Type Safety in C++
cpp Type Safety in C++

November 20, 2020