anyways i'm using Microsoft Visual C++ 2010 express edition
I clicked new project named it "TEST" anyways I clicked win32 console application & I disabled precompiled header.
& I have written this code that is in the book in page 91
// test.cpp : Defines the entry point for the console application.
//
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
int number1;
int number2;
cout<<"enter two integers two compare:";
cin>>number1>>number2;
if (number1==number2)
cout<<number1<<"=="<<number2<<endl;
if (number1 !=number2)
cout<<number1<<"!="<<number2<<endl;
if (number1 < number2)
cout<<number1<<"<"<<number2<<endl;
if (number1 >= number2)
cout<<number1<<">="<<number2<<endl;
}
In the book its looks as if it worked fine without errors but when I run the code it says there are errors do you want to continue I click yes.
After that I type 2 random numbers & then the console disappears!!!!!!!!!
I wrote exactly what the book said what did I miss?

New Topic/Question
Reply




MultiQuote






|