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?
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
@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)
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;
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++
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?
@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.
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.
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!
amazing
abdullahismailkhel 4 days ago
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 5 days ago
@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?
Musicguy208 7 hours ago
did you know you can place "using namespace std" in the top scope? This way all functions in the class can use it...
YourSovietComrade 1 week ago in playlist C++ Programming Tutorials from thenewboston
Y U NO HEY THERE BROWN COW?!
5languages 1 month ago 4
how come this code appears to be different from visual c++ code? Aren't they supposed to be the same language?
xelnos21 1 month ago
@xboy105 you can also use x += 1 for shorthand. :D
RaSp1Nud0 2 months ago
Comment removed
mucle6 2 months ago in playlist C++ Programming Tutorials from thenewboston
Comment removed
MrZrod24 4 months ago
how about a program that shows, a october 2011 calendar using for loop........ pls send to my email,,,, renval08@yahoo.com thnx
bomborombombomable 5 months ago
Thanks :)
XxXEmirIXxX 5 months ago
Thanks A lot
001wewewe 6 months ago
If x++ is the same as X+1, then why does the "hey there" repeat forever when i put x+1 instead?
xboy105 6 months ago
@xboy105
no he said (x++) is the same as (x=x+1)
Underoath434 6 months ago in playlist C++ Programming Tutorials from thenewboston
@xboy105 You gotta type x=x+1 otherwise its not reading x+1 properly
Gredran 2 months ago
NIce.
D5v5d 7 months ago
y u no use meat in examples as u used to! xxD
indiemovieFX 7 months ago
I'm doing programming at 6th form, this helps.
howdydutyish 8 months ago 5
@howdydutyish bitch please, I started with C when I was 10
mogalful 2 weeks ago
@howdydutyish you live in jamaica?
RajayJB 2 weeks ago
Thanks, your tutorial is very clear. Can u do 1 for nested for?
3dwin014 9 months ago
Thank you very much.
ChairmanMarc 9 months ago
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
321boileranimal 9 months ago
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 9 months ago
@thatsmamaluigitoyou1 for loops are useful in certain parts of programs but while loops work well too
bondservant4Him 9 months ago
@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)
BlackBird941 1 week ago
you can also do
for(int x = 0;x<9;x++)
linkinl1 10 months ago
great tutorials
YupHio 10 months ago
Thank you for these tutorials!
BenRyanGamer 10 months ago
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
grodiusx 11 months ago
Great video, you explained Why everything was happening which helps the understanding of why you type what you do.
Great job!
atari26003 11 months ago
Thank you :) This helped out A LOT. :D
kelpieandbigwill 11 months ago
you are an awesome person
Theeriuth 11 months ago
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.
fishsticks555ify 1 year ago
Very nice tutorial, I like it ~
shadowprimita 1 year ago
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++
theif519 1 year ago
Hey! Just wanted to say thanks for the awesome tutorial! Keep up the good work!
FodderMagnet 1 year ago
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 1 year ago
@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
grimlink132 1 year ago
Nice arrays have always been hard for me!
RandomCraziess 1 year ago
Java and c++ can be done at college OR university
However, University is 3 years and college only 2
anish123321 1 year ago
oh nevermind it means until the statement is false.
trappingnoobs 1 year ago
Doesn't x<9 mean x is less than nine? O.o
trappingnoobs 1 year ago
Comment removed
iTzArchitect 1 year ago
Can you do Java/C++ in college or is just university?
trappingnoobs 1 year ago
@trappingnoobs In the UK, Universities usually teach Java (unfortunately). C++ is taught in engineering courses though.
cplusplusish 1 year ago
so you don't need to say "next" at the end?
DTHRocket 1 year ago
just for fun.. I added about five more zeros after my 9 and watched the numbers fly 8)
MasonMachinima 1 year ago
This has been flagged as spam show
Best C tutorials at programmingforfreshers.blogspot.com
raghuace 1 year ago
was really helpful,thanx a lot!!!
nimalwyd 1 year ago
C++ is a lot like java and php. looking through my programs all the codes are very similar.
lukie254 1 year ago
why do you never just use F9. It saves, compiles and runs.
sk8rz21 1 year ago 4
for i,10 do
TheRealAuxiliary 1 year ago
wow now u have more than 24 tutorials
TheRealAuxiliary 1 year ago
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)
Poneivanfa 1 year ago
Comment removed
Poneivanfa 1 year ago
The program executed 10 times bro. not 9 times. coz in c++ u have to start counting from 0.
trinidad143 1 year ago
@trinidad143 it did loop 9 times: 0, 1, 2, 3, 4, 5, 6, 7, 8, then 9 ends the loop, and is not used.
dmdrummer23 1 year ago
@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.
KudendarX007 1 year ago
its good to start out c++ with java knowledge their syntax are quite similar
nitsujj2007 1 year ago
your video are so simple to learn and very very good , keep up the good work buddy !
elebouth 1 year ago
i prefer
for (int x = 0; i < 99; i++)
HopelessRomantic9000 1 year ago
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 1 year ago
@Danny1337 it is a good habit to use the {}s but in the case of one line being looped, they are not needed
dmdrummer23 1 year ago
More array please. <3 you are really the best.
mgtuta 1 year ago
i find that antirtfm is more clear on the subject of c++
whiteninjastudios 1 year ago
i wish i had the same type of tutour's explanations! thank dude
davidkhd 1 year ago
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 2 years ago
@DannyG456789
it worked for me, maybe an error on another part of program?
IluvHKong 1 year ago
Because you cannot scroll that far up?? lmao
nickrohn93 1 year ago
@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 1 year ago
@Vampus
Oh, right.
Thanks
DannyG456789 1 year ago
3:17 lol
sheaky420 2 years ago 3
How come if I go all (x=0;x<9;x+1) it just keeps running?
w33nDK 2 years ago
(x=0;x<9;"x++" or "x=x+1")
Thats ur mistake
hyundai0 2 years ago
@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;
0121ryanh117 2 years ago
THANK YOU i im pretty much failing this part of the course but this helped a lot!
lionandthebell 2 years ago 48
your tutorials rule, dude
i love you.
(no homo)
captainclayman 2 years ago
your comments rule, dude
I love you.
(homo)
nickrohn93 1 year ago
f9 but not enough
passionofchamp1 2 years ago
I wish he went over loops earlier
Flashlabs 2 years ago
Amazing lessons mate!
So far I've really liked the C++, they Python and the "how to build a PC". Phenomenal.
AnElevatorRepairman 2 years ago 4
can anyone tell me how to make the typing sound like the kind you hear in the video
kle8309 2 years ago
By pressing buttons on the keyboard? What kind of question is that?
AnElevatorRepairman 2 years ago 8
its just the mic picking up the sound of him typing..
Aflikshun 2 years ago 3
for(;;)
{
// do stuff
}
is a ever-lasting loop.
for ex. when you want to show a menu.
twisizz 2 years ago
To save lines you can also declare your variable inside the parameter.
for(int x=0; x<10; x++)
Hyperdog009 2 years ago 3
wow i wasnt even understanding for loops well they need to fire my teacher.
KingsandmanII 2 years ago
char myChar;
cin >> myChar;
return 0;
}
hebronsawyers 2 years ago
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.
MadDawg010 2 years ago
WOW, this is the same as the PHP for function.
Thanks for the tuts.
fawaz1992 2 years ago
java,
actionscript (flash),
php,
c++
are same! :)
altu892 2 years ago
I know, you learn of them and you basically know the rest
CrAkdICE 2 years ago
if u whant to add everytime 10 units they u just type i +=10 not ++i .
kodila 2 years ago
You can do it either way...
BomberLaaz 2 years ago
yay 20 !
techfixer16888 2 years ago
tnx my teacher, from mongolia
buuveituguldur 2 years ago
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)?
poonedplox 2 years ago
If you make it that way you have a infinite loop. The right way should be: x = x+10 or x+= x
CesarSSb 2 years ago
Oops, I mean x+= 10
CesarSSb 2 years ago
This has been flagged as spam show
anyone can help me to make a program of cpu scheduler, please i really need it i may failed in midterm grade pls help.
ayettrisha 3 years ago
Google: cpu schuedler -.- RTFM IDGaF
balu65 2 years ago
lol @ namespace in function
ZeroMemPtr 3 years ago
lol i know... dont understand that either, but these videos would have been pretty helpful when i was in intro to c++.
sportsnumber8 3 years ago
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.
jeff5437 3 years ago
you can check c++ absolute nOOb spoonfed videos on youtube > he is very good as well.
bgbyer 3 years ago
or you can also check on youtube for:
strelok c++
EarthBoundGame 3 years ago
or mabye u can all stfu, and watch the best tuts EVER with thenewboston, ;) 5/5
VampieGames 3 years ago
this is wery good
kennis942 3 years ago
you could use hex or ANSCII to use ÅÄÖ
OlloX3 3 years ago
is there already an C++ tutorial 13? tnx for uploading dude.
hakamaka21 3 years ago
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!
nobletime 3 years ago
thanks, ill be adding some more tonight or either tomorrow so keep an eye out!
thenewboston 3 years ago 41