Well first of all, why dump code on us without telling the exact compiler error? If you've got the error message and you can't figure it out, why make it harder on us and make us guess the error as well the solution?
But as to what your problem in..... Why would you name a variable the same name as cin, which is an object of type..... istream (I think)? Get rid of it. You don't need that variable.
End the declaration with a semicolon, not a comma.
Also, what the heck is this line?
Code:
cout int ,<<"Please enter a number: ";
Take your time to write programs. This just shows sloppiness in writing any random thing. It means nothing. What I imagine you meant is this:
Code:
cout << "Please enter a number: ";
You got the direction wrong. You're reading a number from cin to thisnumber. Hence you need:
Mistake, I take it and you want cin.ignore().
Code:
cont<<"You LOST!!! HAHAHAHAH!!!!!!!!!!!\n;"
...
cont<<"Good job you won A POINTLESS GAME thank you for waisting you time!\n;"
cout perhaps?
And put the semicolons on the end of the line. Not inside the string.
Your indenting kind of sucks, too. Working on indenting will help you write, debug, and maintain software.
Furthermore, if your program compiled and executed, what would happen if you entered 100? Nothing would be printed.
How's this for an example?
Code:
#include <iostream>
using std::cout;
using std::cin;
int main()
{
int thisnumber;
cout << "Please enter a number: ";
cin >> thisnumber;
if(thisnumber > 100)
{
cout << "You LOST!!! HAHAHAHAH!!!!!!!!!!!" << std::endl;
}
else if(thisnumber < 100)
{
cout << "Good job you won A POINTLESS GAME thank you for waisting you time!" << std::endl;
}
else cout << "You tied. Maybe try again later." << std::endl;
cin.ignore();
return 0;
}
You might need to add an extra cin.ignore() since it might be reading the '\n' or '\r' from the user.
Lastly, welcome to cboard.