I'm new to C++, and I've been picking it up really well, but when it came to making my own function, I hit a problem. I've looked and I cant find the problem, its probably something really stupid but I cant find it. Heres the code, its really simple.
I'll put the code in bold.
From the top:
# include <iostream>
using namespace std;
int main()
{
cout << "Hello!\n";
testFunction ();
cout << "Your back!\n";
char f;
cin >> f;
return 0;
}
void testFunction ()
{
cout << "Hello 2!\n";
}
I know its really simple but I dont see the problem with that. I read all through my C++ book and I found nothing that could help and I copied the code exactly. Also, the tutorials on youtube that I use on the side had exactly the same code.
The compiler I'm using is Dev-C++ 4.9.9.2. All I done was click the empty file icon and wrote the code, and I havent altered the settings on the comiler, its all default.
If anyone can help it would be very much appreciated. :confused: