본문 바로가기
Problem Solving

using namespace std

by REAL IT 2023. 7. 2.
728x90

When we use names of variables, functions, etc., we use one unique name in one namespace.
 
We can use a variable name "num" in one namespace, and the same name in another namespace. And it can be used like the following:
 
N1::num
N2::num
 
Of course, they are different variables.
 
By typing "using namespace std" after typing "#include <iostream>", we can use names in the standard library directly like "cout" instead of typing something like "std::cout".

'Problem Solving' 카테고리의 다른 글

My first g++ compile ever  (0) 2023.07.12
CGI vs WSGI vs ASGI  (0) 2023.07.02
방송대 공략집 KNOU-HOW 배포  (0) 2023.07.02
파이썬 리스트 값 복사와 레퍼런스 구별  (0) 2023.06.28
방송대 A+ 받는 방법  (0) 2023.06.19