Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

C++ Tutorial (22) - Absolute n00b spoonfeed

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
22,284
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Apr 21, 2008

Video tutorials about programming in the C++ programming language.

Part 22:
* for loop

Pardon my imperfect english.

Forum: http://cpptutorials.freeforums.org/

If you have any suggestions about how to make this video clearer, more n00b helpful, and explanatory, please send me a message.

If you have any C++ questions, please comment.

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (antiRTFM)

  • what was the forum's name again ?

  • @the6aces see video info

  • I really enjoyed the videos up untill now Anyway I had a question when I use counter + 1 instead of ++ the loope is infinite. Why can't you use + 1.

  • 1) you probably didnt assign anything to your 'counter' yet so it acts crazy. Never use a variable before initializing it with a value!

    2) "counter + 1" will never keep counting up higher and higher until its time to stop. the ++ operator counts it up.

  • i have inserted 2 conditions in the loop one of them been ignored

  • see my channel FAQ #3 and #2

Top Comments

  • it would be funny if you named the counter variable "C" then it would have been

    for ( int = C ; C<100 ; C++)

  • Legend :D!

see all

All Comments (60)

Sign In or Sign Up now to post a comment!
  • WHOOT!!! Finally , the awesome code of "loops". :D

  • where is 20 and 21?

  • @gamma526 you mean int C = 0

    -_-

  • @LordOfMedusa it wouldnt be ==2. it would be

    for ( int i = 0;

    i < 10;

    i+=2

    ){}

    Sry had to separate it because youtube doesn't allow code

  • The best!

  • could you use ==2 or another int to increase by more than one

  • @89myacc to do it like that you need counter=counter+1

  • for some reason every time i go to sleep since i watched this video i hear countless whispers inside my ear "hello world...!" x_x

  • Wonderful stuff man... Very helpful!

  • Is there any way to have a variable specified BEFORE the loop? like if you have the user write a # then that number is the number of times the loop reruns?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more