main.cpp:7:21: error: ‘func’ was not declared in this scope
cout << func(2,8);
#include <iostream>
using namespace std;
int main()
{
cout << func(2,8);
return 0;
}
void func (int a, int b) {
return a+b;
}
#include <iostream>
using namespace std;
int func (int a, int b) {
return a+b;
}
int main()
{
cout << func(2,8);
return 0;
}
#include <iostream>
using namespace std;
int func(int a, int b);
int main()
{
cout << func(2,8);
return 0;
}
int func (int a, int b) {
return a+b;
}