pretty primative c++ coding but see if your interested
o-k so C++ is the mix between binary and English. NOTE C++ looks nothing like a vb6 program it shows up in a DOS-box but hypothetically you could write a couple hundred lines of code to make it resemble somewhat a XP window but for now we move on. this is the best decompiler for C++ on the market thats free: http://downloads.phpnuke.org/en/downloa ... V-C%2B.htm
o-k so install it and open it.
http://i302.photobucket.com/albums/n...eeenob/1-1.gif
now go to file- new-source code now you should have this
http://i302.photobucket.com/albums/nn119/gleeenob/2.gif
the big white ox is your template and that is where you will write your code.
Im sorry that every thing you have learned in vb6 is pretty much use less in c++ so get ready to be a lil confused.
NOTE: the " // " string is used for if you want to explain something so that people who look at your source can read along better. exp, //program that rapes your hard drive and your stocks
in devc++ that would be green
now to start you tell the computer where it gets its info from so you start like this
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
o-k see that " { " sign at the end, ya that sucker is crucial when separating chunks so for simple programs theres only one at the beginning and end, the end one i will talk about later. o-k so we have our base now we need to declare the functions this is a simple income finder, heres the source code and i will go over putting comments.
#include <cstdio> //this part is telling the computer what windows apps to include
#include <cstdlib> //
#include <iostream> //
using namespace std;
int main(int nNumberOfArgs, char* pszArgs[])
{
double hmw; //you see doule their that means a decimal
cout << "enter amount of hours: "; //cout means "see output" so what youl c in th box
cin >> hmw; //cin means what is typed in and >> means make so "cinput = hmw"
double income; //again a decimal, an integer is int long isa verry ig int but thts more
income = 6.55; //advanced. o-k so this means the string income = 6.55
double output; //decimal
output = income * hmw; //this makes the string output = income x hmw and the "x" has to be
//a " * " for multiplication
cout << "amount of money made: $"; //cout is what you see
cout << output << endl; //remember out put well that is now outputted with <<
//and "<< endl;" means endline
system("PAUSE"); //this is just the end
return 0;
} //remember to end with" } "
o-k these rates arnt up to date. (thank god)
also NOTE " ; " means end of section or like endsub but program keeps going
REMEMBER that << always goes with cout and >> always goes with cin
now this is error free i checked it so heres a virsion of it without the comments even tho comments dont hurt anything.
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberOfArgs, char* pszArgs[])
{
double hmw;
cout << "enter amount of houres: ";
cin >> hmw;
double income;
income = 6.55;
double output;
output = income * hmw;
cout << "amount of money made: $";
cout << output << endl;
system("PAUSE");
return 0;
}
Copy and paste that or write it just as it is in the white box now compile with execute-compile or ctrl-F9 it will take a sec then it will say done and you can run it and it works! congrats you made your first c++ program its not much but this is a basic understanding if you want more then get C++ for dummies by Stephan Randy Davis.
also thank you Stephan for helping me with C++ and this tutorial was created originally by LuDy but since it looks allot like the first program in c++ for dummies i give Stephan most credit :cool:
this is your product
http://i302.photobucket.com/albums/nn119/gleeenob/3.gif
THANK YOU and please check out ludy.4rumer.com :thumbsup:
hopefully you will start C++
Re: pretty primative c++ coding but see if your interested
Edit your first post and delete the second
How long did it take you to do all of that
Re: pretty primative c++ coding but see if your interested
i cant delete the reply's it wont let me
Re: pretty primative c++ coding but see if your interested
Don't double post delete your second and put it in your first
Re: pretty primative c++ coding but see if your interested
ill merge them later.
very impressive though i muse say did u do this all yourself if so then im impressed even more.
Re: pretty primative c++ coding but see if your interested
thanks for compressing and i did it by myself except of course i was tought C++ from a tutor. Not alot but the good stuff this is also at http://z11.invisionfree.com/darket/ which is where i originally wrote it, but i put a better updated one here with out as many typo's and i had messed up the comments so they would mess up the program. If you want proof i wrote it go to http://z11.invisionfree.com/darket/ and go to tutorials its also by this sn and i also wrote some evil little viruses in my young programing days so i posted them there. But yeah i wrote this by myself.
And im not advertising http://z11.invisionfree.com/darket/ i kinda pissed 'em off but their o-k. (their a "trainer site" to) but if you wana check http://www.ludy.4rumer.com/ that is my site just in case you have time :grin:
Re: pretty primative c++ coding but see if your interested
well since its for the purpose of the tutortial i wont remove the links but make it a 1 link minimum
Re: pretty primative c++ coding but see if your interested
Killer wasn't it you that did something else like this for making a pre hack of a game ?
Re: pretty primative c++ coding but see if your interested
oh sorry bout the links ya ill get ridda those