Çʵå Å×½ºÆ®
1. ´ÙÀ½ ¿¹Á¦¸¦ ½ÇÇà½ÃÄ×À» ¶§ Ãâ·ÂµÇ´Â °á°ú¸¦ ¿¹»óÇØº¸ÀÚ. (28Àå ¼Ò½º Æú´õÀÇ exer ÇÁ·ÎÁ§Æ®¿¡¼ È®ÀÎÇÒ ¼ö ÀÖ´Ù)
1.
#include
<iostream>
2.
3.
namespace
Mouse
4.
{
5.
int
buttons = 100;
6.
}
7.
8.
namespace
Keyboards
9.
{
10.
int
buttons = 200;
11.
}
12.
13.
using
Mouse::buttons;
14.
15.
int
main()
16.
{
17.
using
Keyboards::buttons;
18.
19.
std::cout
<< buttons << "\n";
20.
21.
return
0;
22.
}
Á¤´ä->
buttons¸¦ »ç¿ëÇϱâ Á÷Àü¿¡ Keyboards::buttons¸¦ »ç¿ëÇϰڳë¶ó°í ¼±¾ðÇ߱⠶§¹®¿¡ Keyboards::buttonsÀÇ °ªÀÎ 200ÀÌ Ãâ·ÂµÈ´Ù.