与此相关
我想知道嵌套名称说明符究竟是什么?我在草稿中查了一下但是我能理解语法,因为我还没有学过任何编译器设计课程.
void S(){}
struct S{
S(){cout << 1;}
void f(){}
static const int x = 0;
};
int main(){
struct S *p = new struct ::S;
p->::S::f();
S::x;
::S(); // Is ::S a nested name specifier?
delete p;
}
Run Code Online (Sandbox Code Playgroud)