//This will create a function that prints 'You just called a function.'
std::cout << "You just called a function.\n";
//This will use a function allong side 'std::cout' to print text on the screen.
std::cout << "Really? :O";
// This will add two specified numbers.
int Add (int x, int y)
Please could someone explain why this is not working and how to fix it?
1)Add should be declared before it is used (used on line 14 and declared on 18). You can either move the whole function definition before the main or keep it in its place and add a prototype before main (int Add(int x, int y);).
2) On line 14, you probably forgot something before the << operator. Perhaps you wanted to print the output? It should be something like std::cout << Add(10, 13);.
<< is a binary operator. What is on the left side of << on line 14? ';' ?
Add is a function that takes two arguments, while you only pass one. write Add(10, 13) instead.
The compiler reads your code from top to bottom. On line 14 it has no knowledge of a function you define on line 18. You should declare the function Add before you call it.