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?
Just curious. The text will be displayed 99 times right?.. since you gave "counter < 100" .. i guess if it were "counter <= 100" .. it would've displayed 100 times..
Hello antiRTFM!!! This video is excellent and I enjoy it.
I already know some C++ but this makes learning easier for me cause I'm visual learner. However, I can't find the practices that you are referring to in video #22. Is it still available?
i didnt know uptill now, what's the difference between a float and a double i cout them 1.23456789, and the float gave me like the double, which is 1.234567, i need an answer asap thx nice videos u r a GREAT teacher !!!
and by the way, Dev C++ is widely looked down upon for countless reasons, especially when we have the free Visual C++ Express for PC and Xcode for MacOS
So what's the difference between making a variable within a function, structure, union or a class's parenthesis and making them within their brackets?
In Tutorial 22 you are mentioning a forum where you have put some exercises. I am really not being able to find it. Would anyone please advise on that?
truth is, it all depends on what kind of game. you can begin making little text-based games now (see the forum for some examples), but huge 3D games will be another LONG time...
i think it has the HQ option when you record it on a bigger resolution. ( from what i've seen on my videos) A movie of 640x480 and bigger, uploaded on youtube, should have the hq option.
WHOOT!!! Finally , the awesome code of "loops". :D
iExD 6 months ago
where is 20 and 21?
Zonde32 7 months ago
The best!
masteroforkut 8 months ago
could you use ==2 or another int to increase by more than one
LordOfMedusa 8 months ago
@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
hjjais 7 months ago
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
BboySpikey 9 months ago
Wonderful stuff man... Very helpful!
SirStrum 10 months ago
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?
Kizzurazzgabi 1 year ago
Im a bit stuck.. why doesn't this display a list of numbers as it counts up?
int main()
{ for (int counter = 0; counter <10; counter++ ); { cout << counter; cout << "\n"; }
missed out the normal extra stuff to save space..
Vortigon 1 year ago
@Vortigon
The problem is the third semicolon. After the for() you should have the block {...}.
What the third semicolon is doing is ending the for() expression (when in fact you're not done yet, you want to put code in it).
limp1t 1 year ago
Amazing, very good. Everytime u mention of more info videos on the right section for practice. But can't find any with the title u mentioned.
Is there a possibility of having ur video tutorial cos my internet is slow so i would like to save them for future reference. Thanks mate
babuks82 1 year ago
Great tutorial! And your english is good.
MrStefan124 1 year ago
I can make that everytime it loops it call a function? like this:
for (int = x; x <100; MyFunc(); && x ++)?
this would spam MyFunc(); 100 times right?
xXxDiukexXx 1 year ago
Just curious. The text will be displayed 99 times right?.. since you gave "counter < 100" .. i guess if it were "counter <= 100" .. it would've displayed 100 times..
skoushik333 1 year ago
@skoushik333 No, it will be displayed 100 times, because the counter starts at 0, not 1.
tahayassen 1 year ago
@tahayassen Ah.. I see.. Thanks for the reply :-)
skoushik333 1 year ago
what is the advantage of a for loop as opposed to a while or do while loop?
mistahowe 1 year ago
Comment removed
tahayassen 1 year ago
@mistahowe It's mainly preference. Most programmers use for loops to do counters, and use other looping necessities with while loops.
tahayassen 1 year ago
Small correction for the start:
Video information is now, thanks to youtube, below the video.
To the right of the video are some advertisements we all hate.
Falconimator 1 year ago
what was the forum's name again ?
the6aces 1 year ago
@the6aces see video info
antiRTFM 1 year ago 5
Hi antiRTFM there is a semicon after 9, Is it mistake?
arcaniumb 2 years ago
@arcaniumb What 9?
0121ryanh117 2 years ago
Hello antiRTFM!!! This video is excellent and I enjoy it.
I already know some C++ but this makes learning easier for me cause I'm visual learner. However, I can't find the practices that you are referring to in video #22. Is it still available?
mojbrenalog 2 years ago
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.
89myacc 2 years ago 3
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.
antiRTFM 2 years ago
@89myacc you can use +1
iam4eversmart88 2 years ago
@89myacc to do it like that you need counter=counter+1
TEHSOULREAPER 9 months ago
i have inserted 2 conditions in the loop one of them been ignored
skimo9000 2 years ago
see my channel FAQ #3 and #2
antiRTFM 2 years ago
it would be funny if you named the counter variable "C" then it would have been
for ( int = C ; C<100 ; C++)
gamma526 2 years ago 33
you could name the counter variable c, no reason why you cant.
0121ryanh117 2 years ago
lol possibly the geekiest joke ever. points++
deadleg22 2 years ago 2
that was epic, gamma XD
MeneerJK 2 years ago
@gamma526 you mean int C = 0
-_-
hjjais 7 months ago
isnt loop the very basic foundation for game creation ?
kopilatis12321 2 years ago 2
Yeah, but not this kind of loop, for loops go instantly all in one frame, you need a loop that goes once every frame.
Not sure how to do that in c++
Farzher 2 years ago
Im curious, what do you mean "you need a loop that goes once every frame."?
0121ryanh117 2 years ago
You type in a 100000000 for one of those and you made an exe that can give someone a seizure.... Funny funny funny funny funny lololol
tubby775 2 years ago
Legend :D!
babyaiko 2 years ago 16
i didnt know uptill now, what's the difference between a float and a double i cout them 1.23456789, and the float gave me like the double, which is 1.234567, i need an answer asap thx nice videos u r a GREAT teacher !!!
markyehia 2 years ago
doesnt work in Dev C++
AlienInsect 2 years ago
what doesn't?
and by the way, Dev C++ is widely looked down upon for countless reasons, especially when we have the free Visual C++ Express for PC and Xcode for MacOS
antiRTFM 2 years ago
I typed it out how it looks into the programmer and nothing ran it gives me errors in the cout area
AlienInsect 2 years ago
see my channel's FAQ for your response;
code 3, code 2
antiRTFM 2 years ago
i just use it coz its small
element1988 2 years ago
it worked for me in Dev c++
Ninjasprayer 2 years ago 3
im looping =)
superjuice19 3 years ago
So what's the difference between making a variable within a function, structure, union or a class's parenthesis and making them within their brackets?
Sadlez 3 years ago
all have their purposes, as explained in the videos
antiRTFM 3 years ago
I can't go on for today. pluss is thanks giving day so a break is ok.
Sadlez 3 years ago
So what would happen if you typed.
[CODE]
for (const int counter = 0; counter < 10; counter++)
[/CODE]
Would this just loop forever or would there be an error?
Ziphlon 3 years ago
This code cannot compile because you cannot perform "++" upon a constant variable
antiRTFM 3 years ago
All right thanks a lot! I didn't want to run this and find it stuck in an infinite loop or something.
Ziphlon 3 years ago
Love your vids.
they are very helpfull
i was wondering if there was any reason why you use cin >>f; to keep the program up, instead of system("PAUSE"}
jacarrdude 3 years ago
system("pause"); is not standard C++ as you will see in future videos
antiRTFM 3 years ago
In Tutorial 22 you are mentioning a forum where you have put some exercises. I am really not being able to find it. Would anyone please advise on that?
fkhalail 3 years ago
its in the video info
(click on "more info")
antiRTFM 3 years ago
Thank you so much for dedicating your time making these videos and sharing of your knowledge.
fkhalail 3 years ago
how log do you think it will take me to make a simple platform game with my currnt C++ knowledge? (this is the latest tutorial ive seen)
ZayLong 3 years ago
harrumpf.... a long time :)
truth is, it all depends on what kind of game. you can begin making little text-based games now (see the forum for some examples), but huge 3D games will be another LONG time...
antiRTFM 3 years ago
you are doing a great job!!! I'm learning so fast. I think it's even better that my class in Miami Dade college.
I really appreciate what you are doing!!!!
Thanks.
maciphoneuser 3 years ago
thanks, and keep it going :) !
lambda30 3 years ago
do you think you will get to pointers somewhere in your videos
pointblank941 3 years ago
sure. i am thinking of making it my next video (#41) im just trying to figure out how ro make YouTube HQ vids...
antiRTFM 3 years ago
i think it has the HQ option when you record it on a bigger resolution. ( from what i've seen on my videos) A movie of 640x480 and bigger, uploaded on youtube, should have the hq option.
MihaelaAchiroaie 3 years ago
can you break or exit the loop somewhere inside the { } ? with using an if statement inside?
danielghofrani 3 years ago
yes, as we will learn about the 'break' statement
antiRTFM 3 years ago