![]() |
#2
wangzhsh2010-05-22 17:57
回复 楼主 realll
|
1.#include<iostream.h>
#define N 5
void fun();
void main()
{
for (int i(1);i<N;i++)
fun();
}
void fun ()
{
static int a;
int b(2);
cout<<(a+=3,a+b)<<endl;
}
答案是输出结果
5
8
11
14
可是我用VC编译····下 输出结果为5
想知道 如果输出结果像答案那样 ,代码应该怎么修改??
多谢多谢