Hey all. I'm a beginner. Please somebody tell me what's wrong with the simple use of my else statement. The compiler says: "Error. Expected a statement."
// IfDemo.cpp : Defines the entry point for the console application.
//
// demonstration of IF statement
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
// first argument
int nArg1;
cout << "Enter arg1: ";
cin >> nArg1;
// second argument
int nArg2;
cout << "Enter arg2 ";
cin >> nArg2;
// now decide what to do
if (nArg1 > nArg2);
{
cout << "Heck yeah arg1 is larger! \n\n";
}
else
{
cout << "Afraid not, my friend. Sorry! \n\n";
}
return 0;
}