Hello everyone, I am on my second week of a C++ programming class, and I keep getting this error while working on Visual Studio 2008. I know that it is probably something simple, however after a few hours I have run out of ideas.
the piece of code that is giving me the error is:
if (number1 > number2)
{
smaller = number2;
}
cout << " The smaller number of the two is: " << smaller << endl;
if (number2 > number1)
{
smaller = number1;
}
cout << " The smaller number of the two is: " << smaller << endl;
else
cout << " The two numbers are equal." << endl;
cout << endl;
Please guide me in the right direction.