Did you ever got a correct answer with this ?
Code:#include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main(int argc, char** argv) { system("TITLE Guess My Number."); system("COLOR 5"); srand(static_cast<unsigned int>(time(0))); int iMyNumber; int iYourNumber; int iPoints = 5; while(true) { cin.clear(); iMyNumber = rand() % 100 + 1; cout << "You start with 5 points, each spin cost 1 point." << endl; cout << "Guess my Number '1 - 100'" << endl; cout << "Get as many points as you can!" << endl; do { cout << "Enter your Number "; cin >> iYourNumber; iPoints += -1; if (iYourNumber > iMyNumber) cout << "Too high!" << endl << endl; else if (iYourNumber < iMyNumber) cout << "Too low!" << endl << endl; } while (iYourNumber != iMyNumber); cout << "Correct!" << endl << endl; cout << "You've got " << iPoints << " points." << endl << endl; cin.get(); } return 0; }
Did you ever got a correct answer with this ?
Like this ?
Edit:
You've got -2 points. lolwut?
Last edited by Hassan; 09-02-2011 at 01:37 AM.
lol, fail. Positive and negative = negative.Code:iPoints += -1; //Should be iPoints++;
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
Genius -.-
I made my hint a little more complicated The hint points to a pointer which points to a struct whose third field points to a pointer which points to the value. GLHF
EDIT
@master131, hey genius when you get a wrong answer you lose a point, not gain one. Derp.
@Hassan lol he forgot to give you points when you get a correct answer
Last edited by Jason; 09-02-2011 at 01:45 AM.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
I'm new to C++, thanks though -.-..
lol, what I supposed to write was this:
iPoints--; not iPoints++;
Although what the OP wrote is still OK it's not good practice.
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Same as all C-style syntax languages
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
alternatives to
Code:var += -1 or var += 1Code:var++ var-- ++var --var
hahahaha i had to do this project for my programming class...it was simple and fun