记下以下C++代码:
#include <iostream>
using std::cout;
int foo (const int);
int main ()
{
cout << foo(3);
}
int foo (int a)
{
a++;
return a;
}
Run Code Online (Sandbox Code Playgroud)
请注意,原型foo()采用a const int并且定义采用int.这个编译没有任何错误......
为什么没有编译错误?