RE: using keyword problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The using-declaration is used to bring every declaration with a given
name into scope. Here when you say A::S, there is no namespace "A", it
is the name of the class.

Try the code below. 

class A
{
public:
    struct S
    {
        int x;
    };
};

int Method()
{
    A::S s;
    s.x = 1;
    return s.x;
};


Thanks,
L.Suresh


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux