MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides  
Homepage Register FAQ Members Mark Forums Read Advertise Marketplace FPSowned


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > Programming > Programming section
Reload this Page [Guide] Learning Basic C++
Programming section Programming languages

Reply
 
LinkBack Thread Tools
[Guide] Learning Basic C++
(#1)
Old
7itanium's Avatar
7itanium is Offline
Contributor
Rep Power: 2
Reputation: 191
7itanium has a spectacular aura about7itanium has a spectacular aura about
 
Posts: 683
Join Date: Jul 2008
Location: USA
[Guide] Learning Basic C++ - 08-24-2008

This is a simple introduction to c++, It wont teach you much but can be used to see if this is the programming lanuage you want to learn. The first requirement for learning c++ is a good bunch of spare time C++ ain't easy, so you have to use some time to learn it.


1. IDE
The first thing you should get is a IDE (Integrated development eviroment). IDE is a software where you will write your code a compile it. I use Bloodshed Dev C++. I finde this IDEgreat, and it contains everything a newbee needs.

DOWNLOAD LINK-
[Only registered and activated users can see links. ]

Download and install


1. Get started
The next thing you should do is to make a folder on one of your harddrives to save all your Projects and c++ files. I use c:\cpp . Thats the best place to save your files (my opinion). They will then be easy to access. Now go to your start menue and open cmd.exe (run>cmd.exe). When the black windows opens the type : «cd c:\cpp» (replace c:\cpp with your c++ folder) then leave it open.



3.Your first program
This program is usless, but its allways fun makeing something. Open Dev c++ click on New>Sourc File.
Now type the following:

Code:
/*Pratice_Sample1
 this program wil print «I love C++!»
 */
 

  #include <iostream>
 

  using namespace std;
 int main ()
 {
 cout <<"I love C++!";
 

  return 0;
 }
Save as Practise_sample1.cpp
then press compile (ctrl+F9)


go to the blackbox from step2 and type: practise_sample1.exe. The program will then run!
Congratulations! You have just made your first c++ program, Now it's time to explain some things


The first 3 lines of the code is just a comment, the compiler ignores it, so it wont affect your program.
To make a comment you can use the command «//» or «/* /» in Dev C++ comment will appear in blue text. «//» is used for comments thats just uses 1 line «/* */» is used when the comments uses more than one line.


The comment don't need to first in the program and can be placed before or after a statement.
Example:
cout <<"I love C++!"; //this is a comment!




The next line of code is really importaint for your program, If you thought the word «include»
is there becausee it's inclueds something, then your right. The «#include <iostream>» includes the iostream libary, the compiler then includes code from the «iostream» libary. the letters io in iostream refer to input-output, which is a computer term that describes how data is input into our programs and how we get information out of them. If we fail to include the iostream file in our program, we wouldn’t be able to display the words ‘I Love C++’ on our computer monitors.




The next line contains a «{« It shows that here, the next section of code starts and all programs ends with a «}» that shows that here the code ends.


Now for the main thing in this program, «cout <<"I love C++!";» this is where we tell the compiler what to print out. «cout<<» tells the compiler that it's output, «cout<<» The .exe will the print the text thats between the quotes «"I love C++!"». Each line of code has to be ended with « ; «.


return 0; tells the program that now this section of code is over an the program will now quit. If you have several different of code section in the main c++ file then don't it's not needed. It is only needed at end of programs or after errors.


I have not included 2 lines of code in the little description of c++.


using namespace sdt;
and
int main ()


The reason for not including this is that they arn't worth focusing on at start, it may get a bit too conffusing then, thats something you will need later. This little guid will as said not teach you c++, but gives some pictures of how it verry basacly works. C++ is prettey hard to learn and is going to take a long time to master, for many people it may be best to start with easier languages as maybe Java, I would stay clear of VB since it's theaches lot's of bad habits.


But anyways, the next step of learning more c++ would be to get a book about it. Learning c++ from webased torturials ain't going to bring you far, buy a book or download a .pdf.


Personaly I have read «Learning to program with c++» by John Smiley, I find this book to start at a basic level thats good for learning it, It also dosen't requires any experience from programing from before!



Hope this helps some of the newby programmers!


Reply With Quote

Donate to remove ads.
(#2)
Old
Mirror's Avatar
Mirror is Online
Site Donator
Rep Power: 2
Reputation: 103
Mirror will become famous soon enoughMirror will become famous soon enough
 
Posts: 1,129
Join Date: Nov 2006
Location: 48°N 5' 32" 16°S 1'
08-24-2008

Funny how nobody even looks at the good posts. That could help you get more accounts, but all the leechers are at the giveaway section /tear.



<Errage> A homophobic bisexual, out to protest and hate myself, then try to show myself how to tolerate myself.
Reply With Quote
(#3)
Old
ugly_rocket's Avatar
ugly_rocket is Offline
Site Donator
Rep Power: 2
Reputation: 17
ugly_rocket is on a distinguished road
 
Posts: 50
Join Date: Nov 2007
09-28-2008

How learning to print"I love C++" will get me more accounts?
Reply With Quote
(#4)
Old
join's Avatar
join is Offline
Master Sergeant
Rep Power: 1
Reputation: 26
join is on a distinguished road
 
Posts: 137
Join Date: Dec 2007
Location: 127.0.0.1
4 Weeks Ago

dammit! really nie guide, but, it dosen´t print it for me..



Reply With Quote
(#5)
Old
ugly_rocket's Avatar
ugly_rocket is Offline
Site Donator
Rep Power: 2
Reputation: 17
ugly_rocket is on a distinguished road
 
Posts: 50
Join Date: Nov 2007
4 Weeks Ago

btw i can't seem to know which compiler to download when i click the link i feel im lost


Reply With Quote
(#6)
Old
Viitapiru is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 2
Reputation: 2
Viitapiru is an unknown quantity at this point
 
Posts: 19
Join Date: Jan 2007
4 Weeks Ago

Quote:
Originally Posted by ugly_rocket View Post
How learning to print"I love C++" will get me more accounts?
You know it might feel useless, but when you've learned enough, you can create lot of things that can be used to gain great profit. Tho, that learning is not gonna happen in short period. Those guides that are titled like "Learn C++ in 20 days" are ridiculous.

[Only registered and activated users can see links. ]

Go here for direct download to Dev-C++ 5.0 ide. You might find confused at first. Don't give up, if you are wondering something or having problems, ask for help

Good luck.
Reply With Quote
(#7)
Old
mrclean128's Avatar
mrclean128 is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 0
Reputation: 1
mrclean128 is an unknown quantity at this point
 
Posts: 3
Join Date: Oct 2008
4 Weeks Ago

Thanks for the guide (and download links for C++) it was usefull and i can stop my mum saying that i only play games on the computer.
you should make a full learn c++ guide as you go into depth with what everything does.
Reply With Quote
(#8)
Old
Viitapiru is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 2
Reputation: 2
Viitapiru is an unknown quantity at this point
 
Posts: 19
Join Date: Jan 2007
4 Weeks Ago

Quote:
Originally Posted by mrclean128 View Post
Thanks for the guide (and download links for C++) it was usefull and i can stop my mum saying that i only play games on the computer.
you should make a full learn c++ guide as you go into depth with what everything does.
Of my experiences it doesn't matter what you do in computer, it's still "playing all of the time", thats what your mum thinks ^^

Quote:
you should make a full learn c++ guide as you go into depth with what everything does.
C++ programming contains so huge category of various things that are, in my opinion, impossible to list in one guide. And nowadays since there are already so many good guides, most people are writing them becouse the good learning they gain while writing things, searching for information etc. Well, thats what I think.
Reply With Quote
(#9)
Old
KRYPTON88's Avatar
KRYPTON88 is Online
Site Donator
Rep Power: 1
Reputation: 13
KRYPTON88 is on a distinguished road
 
Posts: 48
Join Date: Oct 2008
Location: FLA
1 Week Ago

Wow thanks! Im trying to learn C++ and start programming Some addons or applications for WoW, Not sure were to start hopefully this program will get me on the right track eh?



[Only registered and activated users can see links. ]
Reply With Quote
(#10)
Old
Bird Is The Word's Avatar
Bird Is The Word is Online
Site Donator
Rep Power: 2
Reputation: 16
Bird Is The Word is on a distinguished road
 
Posts: 129
Join Date: Aug 2007
Location: NJ
1 Week Ago

How do I make it run longer, so it actually stay up on my screen. It just flickers for me.



I'm the doggy doggy dog.

Last edited by Bird Is The Word; 1 Week Ago at 07:08 PM..
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361