MoniWikinamespace
Login:
Password:
대문|찾기|바뀐글|목록|메모장|책갈피|연꽃|링크
Edit Diff Reload Search Print Info Mail Help RSS


  namespace

c++�� ������ ������ ��������
MFC�� ���������� ������������ ���� ���� ��������
���� ������ ���� ������ ����������.

������ ����,������ ���� ������ �� ������, ���� ������ ���� ������ �������� ��������
�������� ���� ������ ������������ ������������ ������,
�� �������� �������� �������� namespace�� ��������.

namespace�� ������ ���� �������� ���� ���� ������ �������� �������� ������ ����.

������ ��_1]
string�� �������� ���� ���� �������� �� ��,
������ ������ ������ ������ ������ ���� ����,
ahn_string �� ���������� �������� ������.
������ ���� �������� ���� ���� string�������� ���� ������ ��������.

������ ����
namespace ahn
{
class string{ .... }
}
������ ���� ��������

void main()
{
using namespace ahn;
string iamstring = "baobo ������";
...
}

������ ��������, namespace ahn {} ���� ������ string �������� ��������.

1) �������� ���������� ������ ���� ��������. (c++�� ���� ����)
void main()
{
ahn::string iamstring = "baobo ������";
std::string iamstdstring = "baobo std ������";
}

2) using directive�� �������� ������ customer ������ ���������� ������ ������ ����.
void main()
{
using ahn::string;
string iamstring = "baobo ������";
}

ahn���� ������ string������ ������ ���������� ���� ����.

������, ������������ std���� c++���� ���� �������� �������� ������ ������
������ ������ �������� �������� ������ �� �� namespace�� ����.

������ ��_2]

������ ���� ...
fully qualified name���� ������ ������
using directive�� �������� ������ customer ������ ������ �� ���� ������...

������ �� ��������..


#include <iostream>
using namespace std;

namespace TestName1 {
    int a = 5;
}

namespace TestName2 {
    int a = 6;
}

int main( void )
{
    cout << TestName1::a << endl;
    cout << TestName2::a << endl;
    return 0;
}
{_r} ���������� ��������

November, 2026
1234567
891011121314
15161718192021
22232425262728
2930 

할 수 있다고 믿는 사람이 성공한다(월터 D.윈틀)

edu2015_박재희교수_손자병법
메모장_시스템
신용_산업기상도
TryEssence_캐릭터애니메이션
last modified 2004-05-11 08:31:02
고치기|찾기|쪽 지우기|비슷한 쪽 Valid XHTML 1.0! Valid CSS! powerd by MoniWiki
0.0669 sec