Home

Egg Directory / Search

New Eggs / Best of New

New Blogs / Pics / Activity
New Files / Movies
Community Forum

Group Directory

Stickers

 


 
THE EGG DIRECTORY
How To / Helpful Guides / Building
Edit PageMessage Dist719Add CommentAdd to FavoritesEmail to Friend

Basic C++ Tutorial

DO NOT TRY THIS AT HOME : Our text files and message bases are for INFORMATIONAL PURPOSES ONLY. DO NOT undertake any project based upon any information obtained from this or any other web site.We are not responsible for, nor do we assume any liability for, damages resulting from the use of any information on this site.
(118 votes)
Published: Jan 13, 2008 2:30 p.m.
In 6 Favorites Lists
Viewed 855 times




Hello all people of RE.. I am Dist719. I have searched for any C++ guides in the database and maybe people tried and didnt get accepted, but I hope maybe mine will.

(For all people that know alot more about coding with this than me please keep all bad comments to yourself, this is directed torward people who dont know and maybe want to get into it. thx)
THIS IS NOT A C/P I PROMISE YOU

NOW, to learn a little about C++, it is originated off of the coding language \\"C\\" and is made to make video games and other such programs (Ex. World of Warcraft, Guild Wars, ect.) C and C++ are used for two different things.. But really I havent learned too much about that, But anyway, In this tutorial I will teach you how to make the basic programs like DOS boxes and thigns like that.

Step One: You need a download. It is not a virus or any spyware trojan blah blah blah, It is a C++ compiler which transmits your code into a program. It is called Dev-C++, and this is the link for the download:
http://www.bloodshed.net/dev/devcpp.html

Now I suggest getting Dev-C++ 4, because 5.0 is currently in beta right now and might have alot of bugs, But if you want to get it, go for it.
The download should take about 4-5 a minute, its only 7.81MB When its done extract and set it up.

Step Two: Installing it shouldn\\’t be a problem, Just download it like anything you would download, Agree, Next, Next, Next, Finish, and your done. Double Click that and you\\’ll Get some Popups saying how you want to configure the program. On the first popup make sure all the boxed are checked, and set the icon style for your liking. After that your program should open up and your SET.

Step Three(A):
Now, you have your program and your ready to learn some coding. The first thing you do is go up to \\"File\\" (Top left corner where it always is) and then click \\"New Project\\". Now a window will pop up and it will say what you want running this project and what coding it will use. FOR NOW click on the \\"Console Application\\" (DOS box) and at the bottom in the radio dots, make sure C++ is clicked. Now, Name it whatever you want.


So, When you look at it there is already typed things in the box, and its no use. Delete all of it and now your ready to start.
Step Three(B):(Learning the code)
You\\’re finally done with the boring setup and your ready to start!

1). In Noobish programs, like making DOS boxes and such, The first thing you would put on the first line is:
#include

Now, to people new to coding they would think well what does that mean. Well, That program is telling the computer to use a standard library file which is basically the file where some C++ commands are, so the computer can understand what it is. For advanced people, they would include alot more.

Now, after your inclusion you want to put:
using namespace std;

C++ uses namespaces to organize names that are different, into programs. Every name used in the iostream stansary library file is in the namespace called, std. (And if your experienced in any coding, the semicolon after it just means another command is coming after it)
Next, is to state your function. Which would be typing this:
int main(void)
Now.. functions are kinda hard to explain for me but lets just say int main is initializing the main function, which is a space where commands are put.

So right now our program has:
#include
using namespace std;
int main(void)


So, now your are going to make some commands. Under \\"int main(void)\\" you want to put a bracket.
ex.
int main(void)
{

Now, in the bracket you are going to put your function.
A simple command (and what everyone uses their first time with C++) is the \\"cout\\" command. (Pronouced C-out) Now cout means that you are going to show text on something. cout is basically sending out text to the program. Now, how to use this Cout command:
Quote:
cout (two \\"less than\\" signs) \\"Hello\\";


and you need a \\"return 0;\\" at the bottom so it doesent close automatically.
So you should end up with this:
Quote:
#include
using namespace std;
int main(void)
{
cout (Two \\"less than\\" signs) \\"Hello\\";
Return 0;
}


Now, That is the most easiest program out there (probably). To start the program go to the top of the program window and click execute. If there is ONE PROBLEM it will not run. The code has to be perfect. When you execute it, a DOS box will pop up saying whatever you but in the \\"cout\\" command.


Thank you for reading this, and I know it may not be the best egg, I know there is no pictures and maybe some things are spelled wrong.. but please if you have any questions message me or comment on here, Please do not rate bad because there are no pictures, I tryed to cover that up by putting alot of detail. THIS IS for people who dont know C++ and to get them started, if your really good dont flame on me. Thank you all.
 

Add Egg To Watchlist

UTgod27

Jan 13, 2008 2:36 pm -
its ok. but not really interesting 3*


Eamox

Jan 13, 2008 3:13 pm -
Ignore the fags, 5*


UncleSpam

Jan 13, 2008 3:14 pm -
good effort 5*


Dist719

Jan 13, 2008 3:14 pm -
lol nice avitar eamox.. and ty


the1337

Jan 13, 2008 3:19 pm -
I gave you a 5* despite the "no pictures"


Why didn’t you put pictures in this egg?


Dist719

Jan 13, 2008 3:22 pm -
Well.. I kinda thought that without pictures it wouldnt do such a big deal.. I mean its just a text box and you type stuff so why take pictures of a box?
for the setup.. I mean I can tell you what to click.. so pictures really wouldnt do much even if i added them


Muffinman99

Jan 13, 2008 5:34 pm -
sweet 5*


m0rtified_p3nguin

Jan 13, 2008 5:45 pm -
#include is a preprocessor
it has to have something after it to mean anything; like or any other external shit you are going to use (or else you can just forget about it). decent egg though.


m0rtified_p3nguin

J n 13, 2008 5:47 pm -
fuck supposed to say
Quote:
like < iostream > or any other external shit you are going to use


Demosthenes-1789

Jan 13, 2008 6:30 pm - Great!
Excellent!


Paulmarti

an 13, 2008 6:47 pm -
Really great for basic stuff. I’ve seen a textbook on C++ and they’re like 2+ inches thick, so good luck with your studies in that. 5*s

Jan 14, 2008 12:29 am -
nice egg - didn’t need pics 5* & on profile


--Jotto--

Jan 14, 2008 8:15 am -
Well done, 5***** and 5 on your profile too.


Dist719

Jan 14, 2008 1:07 pm -
ty all, and mortified, i got the same problem writing this.. the site just instantly deletes sum of the commands so.. idk why


m0rtified_p3nguin

Jan 14, 2008 1:22 pm -
haha yeah figured that was it when i posted the second one, 5 stars btw


SYLAR

Jan 14, 2008 2:30 pm -
5* hooray for programming eggs


Dist719

Jan 14, 2008 3:56 pm -
Also people.. "Double less-than signs" is:
Quote:

< < (NO SPACE BETWEEN)


and also in the egg there there are quotation marks.. it automatically has "//" in it.. ignore it.. just put "Blah".. NOT
Quote:
//"Blah//"


Mr_Internet

Jan 16, 2008 3:15 pm -
It wont run i click exicute then run but nothing any ideas?


Dist719

Jan 16, 2008 5:08 pm -
if its not running.. well first of all you have to COMPILE and THEN execute.. im sorry about that


ELJONTO

Jan 16, 2008 7:18 pm -
wtf, #include by itself is useless, and "using namespace std" lets you use cout> and all other bits from I/O etc instead of std::cout> etc so it’s also useless if you don’t include


jam-8065

Jan 17, 2008 12:23 pm -
5*s


Dist719

Jan 17, 2008 5:03 pm -
El Jonto.. no duh..
i cant say it because RE just blocks out
Quote:
< io stream >
(without spaces of course)


prince_of_dark ess10

Jan 17, 2008 6:13 pm -
nice, Im learning js at school, and Im certain we’ll be doing this next

5*


ELJONTO

Jan 28, 2008 1:22 pm -
well dist then at least say < io stream> (without spaces) so that people know what to include...


0wnd1zzl3d

Feb 01, 2008 12:21 pm -
cool, a little basic, but it works.

5*

 


Home | Contact Us | Sign Up | Advertise Here
Visit our companion site, Prankpedia.com
Please read the LEGAL DISCLAIMER & CONTENT GUIDELINES
© 2008 rotteneggs.com - A Social Network for Pranksters.
1.077615 (Server 2)