scoping4.c

来自「this is a gcc file, you can download it 」· C语言 代码 · 共 31 行

C
31
字号
// PRMS Id: 4375// Bug: g++ fails to keep track of nested typedefs properly.// Build don't link:class A {public:  typedef char * Ptr;  Ptr s;  Ptr get_string();  A(Ptr string); // { s = string; };};class B {public:  typedef A * Ptr;  Ptr a;  Ptr get_A();  B(Ptr a_ptr);};A::A(Ptr string) {		// gets bogus error -   s = string;			// gets bogus error - }int main() {  A a("testing");  A *a_ptr;  B b(&a);  a_ptr = b.get_A();}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?