K
K
Katya2018-08-14 10:13:32
C++ / C#
Katya, 2018-08-14 10:13:32

What is the difference between #include and using std::?

Hello. I understand that my question will seem to experienced programmers (and experienced ones for me are everyone who knows more than me), but I'll ask anyway. I started learning C++ quite recently and I want not just to memorize the material, but to understand why everything is arranged this way, i.e. why you need to write #include, why using std::, etc. So here's the specific question: how does using differ from include, if both are C ++ libraries in which we are looking for the operation we need? Please answer like a schoolboy, since the question, as I understand it, is appropriate) I'm afraid that I will miss something and after that everything will not go as we would like. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AltLumad, 2018-08-14
@AltLumad

#include is where classes, variables, scopes, etc. will come from.
using std is scope.
If you don't include #include "vector"
You can't access std::vector;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question