Why Error?
#include <iostream>
int main()
{
std::cout << "The sum of 3 and 4 is: " << add(3, 4) << '\n';
return 0;
}
int add(int x, int y)
{
return x + y;
}
Test.cpp: In function ‘int main()’:
Test.cpp:5:47: error: ‘add’ was not declared in this scope
5 | std::cout << "The sum of 3 and 4 is: " << add(3, 4) << '\n';
| ^~~