C++ Tutorial – 12 – For Loops

17 04 2011

Part 13 – http://www.youtube.com Make sure to Subscribe to my Channel for all my latest videos!!! support my website too by registering at thenewboston.com
Video Rating: 4 / 5


Actions

Information

25 responses

17 04 2011
BenRyanGamer

Thank you for these tutorials!

17 04 2011
grodiusx

int x;
for (x=100000;x>0;x–)
cout << "now downloading file # " << x << " to C:/Windows/System32" << endl;
cout << "im sure you think i just gave you a virus….dont be so scared :P" << endl;

Thank you for helping me scare my friend!!! 😀

17 04 2011
atari26003

Great video, you explained Why everything was happening which helps the understanding of why you type what you do.
Great job!

17 04 2011
kelpieandbigwill

Thank you 🙂 This helped out A LOT. 😀

17 04 2011
Theeriuth

you are an awesome person

17 04 2011
fishsticks555ify

You should mention that the for loop will apply to that whole function unless you put the curly braces around the part you want executed.

17 04 2011
shadowprimita

Very nice tutorial, I like it ~

17 04 2011
theif519

I’m teaching myself how to do this,to be honest it’s hard to keep myself interested and motivated, so I do 1 tutorial a day, or a few if they all follow-up on each other, but the only thing that motivates me is 1. Learning more about computers, 2. Being a “God”, creating and destroying programs at will, and 3. I always wanted to learn C++

17 04 2011
FodderMagnet

Hey! Just wanted to say thanks for the awesome tutorial! Keep up the good work!

17 04 2011
grimlink132

@I3L4NK you had to do x=x+2 instead of just x+2. it looped forever because nothing added to x, so it never got larger than 9

17 04 2011
I3L4NK

I was just testing this code out and messing with it, so I put ‘x+2’ instead of ‘x++’ expecting for it to go ‘0,2,4,6,8″ and stop once it got to ten, but it went into infinity and never stopped. What happened and why?

17 04 2011
cplusplusish

@trappingnoobs In the UK, Universities usually teach Java (unfortunately). C++ is taught in engineering courses though.

17 04 2011
RandomCraziess

Nice arrays have always been hard for me!

17 04 2011
anish123321

Java and c++ can be done at college OR university
However, University is 3 years and college only 2

17 04 2011
trappingnoobs

oh nevermind it means until the statement is false.

17 04 2011
trappingnoobs

Doesn’t x<9 mean x is less than nine? O.o

17 04 2011
trappingnoobs

Can you do Java/C++ in college or is just university?

17 04 2011
DTHRocket

so you don’t need to say “next” at the end?

17 04 2011
MasonMachinima

just for fun.. I added about five more zeros after my 9 and watched the numbers fly 8)

18 04 2011
raghuace

Best C tutorials at programmingforfreshers.blogspot.com

18 04 2011
nimalwyd

was really helpful,thanx a lot!!!

18 04 2011
KudendarX007

@trinidad143 (I know im responding to a dead comment but this for anyone else wondering) The reason it looped 9 times is because the conditional was “x<9" and it did start at 0 (remember each time it passed through the loop the number: '1' was added to x). This means c++ started counting at 0 and it was only doing it for as long as x is LESS THAN 9 (Which is 8) so… it stopped at 8 but since c++ starts at 0…that makes it 9 loops.

18 04 2011
lukie254

C++ is a lot like java and php. looking through my programs all the codes are very similar.

18 04 2011
sk8rz21

why do you never just use F9. It saves, compiles and runs.

18 04 2011
TheRealAuxiliary

for i,10 do




%d bloggers like this: