Added: 3 years ago
From: thenewboston
Views: 68,467
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (112)

Sign In or Sign Up now to post a comment!
  • amazing 

  • heeeeeeeeeeeeeeeeelp!!!!

    i kinda understand this, but how do i do it so that i cant have it add .5 every 10 numbers, starting at 50??, so from numbers 50-59 add .5, and 60-69 add 1. a lot of people told me to use a for loop :/

  • @RIPTINY2293 two values, the iterator and the step. run the loop with the iterator starting at 50 and the step at .5. do whatever you need to in the loop, then at the end do an if statement that evaluates the iterator mod 10, if it is true then add .5 to the step variable. Make sense?

  • did you know you can place "using namespace std" in the top scope? This way all functions in the class can use it...

  • Y U NO HEY THERE BROWN COW?!

  • how come this code appears to be different from visual c++ code? Aren't they supposed to be the same language?

  • @xboy105 you can also use x += 1 for shorthand. :D

  • Comment removed

  • Comment removed

  • how about a program that shows, a october 2011 calendar using for loop........ pls send to my email,,,, renval08@yahoo.com thnx

  • Thanks :)

  • Thanks A lot

  • If x++ is the same as X+1, then why does the "hey there" repeat forever when i put x+1 instead?

  • @xboy105

    no he said (x++) is the same as (x=x+1)

  • @xboy105 You gotta type x=x+1 otherwise its not reading x+1 properly

  • NIce.

  • y u no use meat in examples as u used to! xxD

  • I'm doing programming at 6th form, this helps.

  • @howdydutyish bitch please, I started with C when I was 10

  • @howdydutyish you live in jamaica?

  • Thanks, your tutorial is very clear. Can u do 1 for nested for?

  • Thank you very much.

  • I'm completely green in the world of computers, I spent a lot of time as a welder and mechanic. I am back in school for engineering and need to up date my job skills to be more modern. I am taking my first intro to C++ these videos are phenomenal

  • whats the point of a for loop? i mean a while loop does it just as well and is more versatile in my opinion.

    while (x++ < 100{

    }

    works just as well as

    for (int x=0;x<100;x++){

    }

  • @thatsmamaluigitoyou1 for loops are useful in certain parts of programs but while loops work well too

  • @thatsmamaluigitoyou1 it's better suited for when you know how much times you want to do the loop. a while is more for a unknown count. for example: while (!flag)

  • you can also do

    for(int x = 0;x<9;x++)

  • great tutorials

  • Thank you for these tutorials!

  • 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!!! :D

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

    Great job!

  • Thank you :) This helped out A LOT. :D

  • you are an awesome person

  • 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.

  • Very nice tutorial, I like it ~

  • 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++

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

  • 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?

  • @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

  • Nice arrays have always been hard for me!

  • Java and c++ can be done at college OR university

    However, University is 3 years and college only 2

  • oh nevermind it means until the statement is false.

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

  • Comment removed

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

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

  • so you don't need to say "next" at the end?

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

  • was really helpful,thanx a lot!!!

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

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

  • for i,10 do

  • wow now u have more than 24 tutorials

  • nevermind, i just heard again and its x=x+1

    i dont speak english very well because im from brazil

    thank you for your videos robert (i think its robert)

  • Comment removed

  • The program executed 10 times bro. not 9 times. coz in c++ u have to start counting from 0.

  • @trinidad143 it did loop 9 times: 0, 1, 2, 3, 4, 5, 6, 7, 8, then 9 ends the loop, and is not used.

  • @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.

  • its good to start out c++ with java knowledge their syntax are quite similar

  • your video are so simple to learn and very very good , keep up the good work buddy !

  • i prefer

    for (int x = 0; i < 99; i++)

  • Wow i just realized how similar this is to PHP, lol.

    Just one thing, why are there no opening and closing brackets {} for the for-loop ? Is it just gonna loop everything after that line?

  • @Danny1337 it is a good habit to use the {}s but in the case of one line being looped, they are not needed

  • More array please. <3 you are really the best.

  • i find that antirtfm is more clear on the subject of c++

  • i wish i had the same type of tutour's explanations! thank dude

  • If I set for (x=1; x<1000; x=x+1) why does it only show the last 298 numbers when i run the program?

  • @DannyG456789

    it worked for me, maybe an error on another part of program?

  • Because you cannot scroll that far up?? lmao

  • @DannyG456789 That's because the console window can only display so many lines, but they do all print. If you change your program from...

    cout << x << endl;

    to

    cout << x << " ";

    you'll see them all listed side by side.

  • @Vampus

    Oh, right.

    Thanks

  • 3:17 lol

  • How come if I go all (x=0;x<9;x+1) it just keeps running?

  • (x=0;x<9;"x++" or "x=x+1")

    Thats ur mistake

  • @w33nDK Because "x+1" is not really incrementing the variable, you need to use an assignment statement to do that. For example.

    x++;

    ++x

    x--;

    --x;

    x += 100;

    x *= 10;

    x /= 19;

    x >>= 18;

  • THANK YOU i im pretty much failing this part of the course but this helped a lot!

  • your tutorials rule, dude

    i love you.

    (no homo)

  • your comments rule, dude

    I love you.

    (homo)

  • f9 but not enough

  • I wish he went over loops earlier

  • Amazing lessons mate!

    So far I've really liked the C++, they Python and the "how to build a PC". Phenomenal.

  • can anyone tell me how to make the typing sound like the kind you hear in the video

  • By pressing buttons on the keyboard? What kind of question is that?

  • its just the mic picking up the sound of him typing..

  • for(;;)

    {

     // do stuff

    }

    is a ever-lasting loop.

    for ex. when you want to show a menu.

  • To save lines you can also declare your variable inside the parameter.

    for(int x=0; x<10; x++)

  • wow i wasnt even understanding for loops well they need to fire my teacher.

  • char myChar;

    cin >> myChar;

    return 0;

    }

  • I hate for loops. I understand them, but they are a pain when they get complex. I replace them with while loops when possible.

    Good tutorials, btw. So far, I'm liking C++ more than Java.

  • WOW, this is the same as the PHP for function.

    Thanks for the tuts.

  • java,

    actionscript (flash),

    php,

    c++

    are same! :)

  • I know, you learn of them and you basically know the rest

  • if u whant to add everytime 10 units they u just type i +=10 not ++i .

  • You can do it either way...

  • yay 20 !

  • tnx my teacher, from mongolia

  • Reference time 2:30.

    How do you instead of doing "x++" (being in increments of one) change the increments into say x+10(to add by 10 each time)?

  • If you make it that way you have a infinite loop. The right way should be: x = x+10 or x+= x

  • Oops, I mean x+= 10

  • Google: cpu schuedler -.- RTFM IDGaF

  • lol @ namespace in function

  • lol i know... dont understand that either, but these videos would have been pretty helpful when i was in intro to c++.

  • wow your C++ videos are very helpful and just great! but PLEASE keep going and making more past 12 because i got there i dont know where to go from there.

  • you can check c++ absolute nOOb spoonfed videos on youtube > he is very good as well.

  • or you can also check on youtube for:

    strelok c++

  • or mabye u can all stfu, and watch the best tuts EVER with thenewboston, ;) 5/5

  • this is wery good

  • you could use hex or ANSCII to use ÅÄÖ

  • is there already an C++ tutorial 13? tnx for uploading dude.

  • Hey I really want to thank you for putting up these Tutorials, very useful on C++. I look forward to view more Tutorials of you on C++ please. Thanks!

  • thanks, ill be adding some more tonight or either tomorrow so keep an eye out!

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