Apparently it’s a subtle performance thing. Pretty much irrelevant in in everyday coding but I guess in large scale projects, it’s just enough to make a slight difference? Idk I’m just reiterating what someone told me who works for as a C++ software engineer.
Thank you for explaining this. I can't wait to hear about the while loop now. Once I find out about that I can probably get started making a number guessing game or whatever. (well as long as I can find out how to spit out random numbers as well. But I could probably figure that out online. )
11/10 subscribed! lol Thank you for the clarity of when to use a for loop over the while loop. ive been through a few different c++ training videos about iteration. But i was having trouble knowing when to use it or even what it was really saying in the syntax. But i get it now courtesy of this video. just clicked! lol So thanks for explaining it in a clear, makes sense, kinda way! appreciate you dude!
Very nice setup! I like your videos very much! Also, a question, could you make also a C++ advanced programming tutorial series? Because I already know the basics and want to get into more advanced stuff with C++!
You inspire me to be just like you. I know you might not see this comment but moving forward im taking all your python courses. I think python is really good and i have a strong background in java so im hoping its easy to convert to.
Why is this code giving me a error undeclared identifier i? # include # include using namespace std; int main(){ int myArray[5]; for(i=0 ; i < sizeof(myArray)/sizeof(myArray[0]) ; i++){ myArray[i] = i; } for(i=0 ; i < sizeof(myArray)/sizeof(myArray[0]) ; i++){ cout
It is a little bit late but the problem is because i is an integer too and you didnt initialized it so program doesnt know what is i to solve the problem you could just do # include # include using namespace std; int main(){ int myArray[5]; int i; for(i=0 ; i < sizeof(myArray)/sizeof(myArray[0]) ; i++){ myArray[i] = i; }
for(i=0 ; i < sizeof(myArray)/sizeof(myArray[0]) ; i++){ cout
Yes, C++ has many versions Including C++98, C++03, C++11, C++14, C++17, and the newer one C++20. Yes compiler also have a version. I think for most compilers including GCC, MSVC, or Clang the default version of C++ is C++14.
@@vaibhavrahal9711 If you're compiler is either GCC or Clang you can append this command: "-std=c++" For example if you want to use C++20: "g++ -std=c++20 -o test test.cpp" or if you're using Clang: "clang++ -std=c++20 -o test test.cpp" If you're compiler is MSVC you can append this command: "/std:c++" or "/std:c++latest" to get the latest and greatest version of C++. For example: "cl /std:c++20 test.cpp" Note: Don't use quotes or double quotes to the command.
the operator he's using is "%". It still does division but its actual job is to show us the remainder. so 11 divided by 2 is 5 with a remainder of 1. the "%" operator checks for a remainder. I think it's called the modulo operator if you wanted to look it up for yourself or haven't already found the answer. but basically, "i % 2 ==0 is actually checking for a remainder and if there is or isn't one, it's doing something. in this case, it is actually saying, "if i divided by 2 has no remainder, cout this number" Hopefully that makes sense!
The usage of ++i and i++ defer in many situations. If you say cout
I never saw anyone use ++i
Apparently it’s a subtle performance thing. Pretty much irrelevant in in everyday coding but I guess in large scale projects, it’s just enough to make a slight difference? Idk I’m just reiterating what someone told me who works for as a C++ software engineer.
Love the new office look, and of course the great tutorial! Would love to see this series continue further! :)
Tim, you’re an inspiration for us tech youtubers!
wasn't enough to keep you going though.
You’re one of my greatest inspiration right now , I love the way you explain the code easily.
Mic is even better, and camera is even better.
Thank you for explaining this. I can't wait to hear about the while loop now. Once I find out about that I can probably get started making a number guessing game or whatever. (well as long as I can find out how to spit out random numbers as well. But I could probably figure that out online. )
11/10 subscribed! lol Thank you for the clarity of when to use a for loop over the while loop. ive been through a few different c++ training videos about iteration. But i was having trouble knowing when to use it or even what it was really saying in the syntax. But i get it now courtesy of this video. just clicked! lol So thanks for explaining it in a clear, makes sense, kinda way! appreciate you dude!
Bro you are awesome...plz take this tutorial to beginner to advance level .. I have believe in you bro.
Thanks for sharing good quality content with us, Tim.
just ctrl-shift-b and choose the run option and you'll run it in sublime text by using just ctrl-b after
Thanks for this
Very nice setup! I like your videos very much!
Also, a question, could you make also a C++ advanced programming tutorial series? Because I already know the basics and want to get into more advanced stuff with C++!
Good evening Tim, this is Edward from H.K
Hi Tim, When are you going to finsh this series I am really excited to learn C++
keep up the good work tim
Waiting for this video for long time thankx
please make Learn C With Me Series.
thank you so much for these videos
very good room
do you have a video on what you are using to code and how to set that program up
Are you going to do a serie for developing backend with c++ ?
backend of what?
Nice video, Well explained loved it.
There's a rumor going around that yandere dev hates this guy
We come here for the knowledge, not the rumors.
Thanks!
thanks Tim
Thanks
very much better cam
You inspire me to be just like you. I know you might not see this comment but moving forward im taking all your python courses. I think python is really good and i have a strong background in java so im hoping its easy to convert to.
Hay Tim can you make a video about using flask together with react?
Hey Tim, what Laptop do you use?
He uses a computer
very helpful
Why is this code giving me a error undeclared identifier i?
# include
# include
using namespace std;
int main(){
int myArray[5];
for(i=0 ; i < sizeof(myArray)/sizeof(myArray[0]) ; i++){
myArray[i] = i;
}
for(i=0 ; i < sizeof(myArray)/sizeof(myArray[0]) ; i++){
cout
It is a little bit late but the problem is because i is an integer too and you didnt initialized it so program doesnt know what is i to solve the problem you could just do
# include
# include
using namespace std;
int main(){
int myArray[5];
int i;
for(i=0 ; i < sizeof(myArray)/sizeof(myArray[0]) ; i++){
myArray[i] = i;
}
for(i=0 ; i < sizeof(myArray)/sizeof(myArray[0]) ; i++){
cout
Best content ever :)
Hey tim.. Which editor you like?
Sublime text or vs code(with sublime theme)
you used the the sublime🙄 to run the code rather than from cmd
i also want it any help:
good for me
tim, have you ever used kali linux
loops !
Hey Tim can you develop Competitive programming tutorials with C++ .
what ver. of C++ are u using ?
They are versions of C++?
@@pilote111 No. There are only versions of the compilers.
Yes, C++ has many versions Including C++98, C++03, C++11, C++14, C++17, and the newer one C++20. Yes compiler also have a version. I think for most compilers including GCC, MSVC, or Clang the default version of C++ is C++14.
@@user-sy3ny1sz2w Yes, How to upgrade from c++17 to c++20? That'd help me
@@vaibhavrahal9711 If you're compiler is either GCC or Clang you can append this command: "-std=c++"
For example if you want to use C++20: "g++ -std=c++20 -o test test.cpp" or if you're using Clang: "clang++ -std=c++20 -o test test.cpp"
If you're compiler is MSVC you can append this command: "/std:c++" or "/std:c++latest" to get the latest and greatest version of C++.
For example: "cl /std:c++20 test.cpp"
Note: Don't use quotes or double quotes to the command.
I was curious so I started an endless loop of 3s on purpose, holy crap.... a ryzen 7600x delidded and liquid cooled hit 71c ....
Cpp for loop similar to JS for loop.
Wow
So I understand what's happening with
i % 2 == 0
but I'm confused why it's "equals zero". Dividing an even number by two doesn't result in zero.
the operator he's using is "%". It still does division but its actual job is to show us the remainder. so 11 divided by 2 is 5 with a remainder of 1. the "%" operator checks for a remainder. I think it's called the modulo operator if you wanted to look it up for yourself or haven't already found the answer. but basically, "i % 2 ==0 is actually checking for a remainder and if there is or isn't one, it's doing something. in this case, it is actually saying, "if i divided by 2 has no remainder, cout this number" Hopefully that makes sense!
noice
Second
Wow i am first
Iam third lol
You should go to University to TEACH programming.