My friend has decided to jump into C++ (which I told him wasn't the best starting language, but he insisted) as his first programming language.
He has been following these tutorials here. While he was working on functions he messaged me on skype with a problem, he is getting a bunch of numbers from his function. I am unable to see the problem, we could use some help with this, here is the code.
#include <iostream>
#include <string>
using namespace std;
//Function dataType nameOffunc() {}
//function delcarations
void WelcomeMessage();
//prints a welcome message.
int calculateNum();
//Multiplies 2 intergers
//@returns product of 2 other intergers
//function in which error described occurs.
int main()
{
int number;
WelcomeMessage();
cout << calculateNum << endl;
cout << "type a number" << endl;
cin >> number;
return 0;
}
//function definitions
void WelcomeMessage()
{
cout << "WELCOME" << endl;
}
int calculateNum()
{
int x = 5;
int y = 5;
return (x * y);
}
what is the problem?