ctors11.c
来自「this is a gcc file, you can download it 」· C语言 代码 · 共 22 行
C
22 行
// Build don't link: // GROUPS passed constructors// ctor file// Message-Id: <9302081631.AA14744@tera.com>// From: rrh@tera.com (Robert R. Henry)// Date: Mon, 8 Feb 93 08:31:39 PSTextern "C" int printf (const char *, ...);class A{public: inline A(int x){printf("constructing A with %d\n", x);}};class B:public A{ // ERROR - non-default constructorprivate:public:};int main(){ B(10);// ERROR - B doesn't have a constructor taking int}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?