程序编译时出错..大牛们帮忙看看...
程序代码:
#include <iostream> using namespace std; int func(int a,int *b,int *c); int main() { int a=1,b=2,c=3; cout<<"主程序,调用func函数前...\n"; cout<<"a:"<<a<<endl<<" b:"<<b<<endl;<<" c:"<<c<<endl; func(a,&b,&c); cout<<"主程序,调用func函数后...\n"; cout<<"a:"<<a<<endl<<" b:"<<b<<endl;<<" c:"<<c<<endl; return 0; } int func(int a,int *b,int *c) { cout<<"func函数中,计算前...\n"; cout<<"a:"<<a<<endl<<" b:"<<*b<<endl<<" c:"<<*c<<endl; a++; *b=(*b)*(*b); *c=(*c)*(*c)*(*c); cout<<"func函数中,计算后...\n"; cout<<"a:"<<a<<endl<<" b:"<<*b<<endl<<" c:"<<*c<<endl; return a; }
找了半天找不出哪出错..