#include#includeusing namespace std;
fun(){return 1;}
int j = sun();system("pause");return 0;}
不带返回值的函数默认是返回int型
你这个能编译通过?fun()里面带有return 1语句,应该要给一个返回类型吧,如果你不需要用到函数返回的结果值,你可以返回void,在devcpp中如果不加返回类型,编译通不过。