viewimageM.php?id=programming&no=29bcc427b78777a16fb3dab004c86b6f0c84ca7046af80d4132901631ae35077c88ed11d213919a574caf8edc079e9327f10835caf4afb141c7e891a2d052a

#include <iostream>

namespace x
{
    class xy
    {
    private:
        int x;
        int y;
    public:
        xy() {
           x = 0;
           y = 0;
        }

        xy(int _in_x, int _in_y)
        {
            x = _in_x;
            y = _in_y;
        }

        ~xy() {}

        int getX()
        {
            return x;
        }
        int getY()
        {
            return y;
        }
        void setX(int _in_x)
        {
            x = _in_x;
        }
        void setY(int _in_y)
        {
            y = _in_y;
        }
    };
}
int main(void)
{
    x::xy s(12, 12);
    std::cout << \"do not using namespace x\" << std::endl;
    std::cout << s.getX() << std::endl << s.getY() << std::endl;

    std::cout << std::endl << \"using namespace x\" << std::endl;
    using namespace x;
    xy x;
    int a = 30;
    int b = 60;
    x.setX(a);
    x.setY(b);
    std::cout << x.getX() << std::endl << x.getY() << std::endl;

    std::cout << std::endl << \"using std::????\" << std::endl;
    using std::cout;
    using std::endl;

    xy y;
    int c = 20;
    int d = 3;
    y.setX(c);
    y.setY(d);
    cout << y.getX() << endl << y.getY() << endl;
    return 0;
}

네임스페이스 다르게 정의되어있는 헤더에서 메인으로 클래스 가져오는 방법중에
using 안쓰긔, using 네임스페이스::클래스, using namespace 네임스페이스 이렇게 3개가있네

이 3가지 방법중 뭐가 제일 낫냐?