Skip to content

Instantly share code, notes, and snippets.

@derofim
Created August 14, 2015 07:09
Show Gist options
  • Select an option

  • Save derofim/9ee117bacb1fe8ab21a8 to your computer and use it in GitHub Desktop.

Select an option

Save derofim/9ee117bacb1fe8ab21a8 to your computer and use it in GitHub Desktop.
#include <iostream>
int main()
{
using std::cout; // компилятор будет использовать std::cout
cout << "Hello world!"; // не нужен префикс std::
std::cout << "Hello C++!"; // но при желании std:: можно указать все равно
cout << "Hello me!"; // не нужен префикс std::
int x;
// cin>>x; без std:: вызовет ошибку
std::cin>>x; // Но для std::cin мы ничего не указывали, префикс указываем!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment