[MPGH]AVGN (09-26-2010),Stephen (09-25-2010)
Hey guys, when I first started wanting to make hacks, I was told to learn C++.
Some of you don't believe it until you see it, and even though you see what my sig says, alot of people lie.
So, using the LOW amount of knowledge I have of C++ so far, I wrote a simple program that calculates my percentages that I update my sig with. That and another reason I made it, is to make it easier on me.
So I have to do less steps to calculate it.
All I have to do on it is type in the amount of pages I have read so far, and it automatically calculates the percentages for me.
Of course, I plan to make it alot more complex and everything, the more I learn but this took me 3 mins to write up. I thought of it about 20 mins ago while I was smoking a cigg.
Don't flame me, I am learning.
[PHP]
// Credits: D-Vid aka Illusionz
#include <iostream>
int main()
{
using namespace std;
float CppPrimer;
float total;
int pages;
cout << "Enter the total amount of pages that you've read so far: \n\n";
cin >> pages;
cout << endl;
CppPrimer = 1225;
total = 2501;
cout << "Percentage outta the C++ Primer Plus: 5th Edition: " << pages / CppPrimer * 100 << "%" << endl;
cout << "Percentage TOTAL outta all the books: " << pages / total * 100 << "%" << endl;
}
[/PHP]
[MPGH]AVGN (09-26-2010),Stephen (09-25-2010)
Very nice, but you have a long way to go before you start making menus and hacks, and especially inventing new ones.
Good luck to you
Dont ban me
DBag4Life69 (09-25-2010)
DBag4Life69 (09-25-2010)
Lolz. I know what you mean.
Most people aren't very determined.
I am.
I am determined to learn C++ as a language, so I can make stuff that I can use for ANYTHING.
Not just for hacks.
Now, I know that's what my inspiration WAS to start this determination, but my inspiration changed now.
But ANYWAYS, I figured I would release that code, since it's proof that I AM in fact learning SOMETHING, cuz I wrote that all on my own.
Nice job i guess. i didnt read a c++ book. But im going to start soon.
Write me an RPG bich
IcySeal (09-26-2010)
dont use int main(){} unless you use return(0); at the end like so
instead use this styleCode:int main(){ //code return(0); }
it will drop out some errors you get later in longer programsCode:void main(){ //code }
but with the int main your usen main as a function not a procedure
so with out the return you can get a unexpected end of program error
with the void your making a procedure not a function
the big difference is functions return a value
procedures dont, they do something and most of the time call functions
Last edited by tahha; 09-25-2010 at 02:36 PM.
You need to pause it at the end so you can read what it says.
/
Example of choice 1 :
Code:Blah has attacked ! Blah has done 5 damage ! .... ...
OR :
Code:@@@@@@@@@@@@@@@@@@@@@@@ @_____________________@ @_____________________@ @_________O___________@ @_____________________@ @_____________________@ @@@@@@@@@@@@@@@@@@@@@@@ Arrow keys to move...