byval.c

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

C
20
字号
// Bug: a is destroyed in both foo() and main()int count;struct A {  double a,b;  A(int) { count++; }  A(const A&) { count++; }  ~A() { count--; }};void foo (A a){ }int main(){  foo (1);  return count;}

⌨️ 快捷键说明

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