I just wanna point out that "string" or "std::string" is just a class. You can make "C-Style String" using "const char[]" or "const char*". So in minute 1:44 you get "Invalid conversion from const char* to ..." because if you're using double quotes the actual type is "const char[]" or "const char*". So you can declare a string like: const char* str = "Hello"; So what's the difference between "string" or "std::string" and "const char[]" or "const char*"? As I said before "string" or "std::string" is just a class and has various methods to help us to deal with strings but the actual type of the string is "const char[]" or "const char*". But "const char[]" or "const char*" is just a type and doesn't have a methods because it's not a class.
Interestingly, I didn't need to use the size() or .length function. When watching your videos, you always describe what you're about to do before writing the code, and I pause it and try to do it myself first because I don't want to be stuck in tutorial hell and its my way of making sure i understand fully. But, at first what I tried was in fact the array method with sizeof(stringvariable) / sizeof(stringvariable[0]) which interestingly worked, BUT crashed my program after returning the string. So, instead out of curiousity I wondered if I could just use the number of characters in the string and just tried that. Mine was simply "hey", so I did i < 3; and this worked fine. I assume its because of one of my headers or streams? using namespace std, iostream, and (I like using the Sleep() function). Either that, or maybe visual studio is just newer and has things implemented to make it easier.
Tim, could you not "using namespace std;"? It is concidered bad practice, because it defeats the purpose of namespaces which is to avoid naming conflicts. You would be surprised how many things are in that namespace.
This firsr phrase you said got me in: you can access and modify string characters... I was like what??? Strings were supposed to be immutable in many programming languages 😕 And so, I continue watching cuz TIL
Tim? One question: If you learned us c++, can you make an OpenGL tutorial with C or C++. Like you know for the intermediate stuff? :D Would be absolutely gorgeous!
Tim you are doing so much for the people who want to learn coding and get better grades/ job. Thank you Tim.
I just wanna point out that "string" or "std::string" is just a class. You can make "C-Style String" using "const char[]" or "const char*". So in minute 1:44 you get "Invalid conversion from const char* to ..." because if you're using double quotes the actual type is "const char[]" or "const char*".
So you can declare a string like:
const char* str = "Hello";
So what's the difference between "string" or "std::string" and "const char[]" or "const char*"? As I said before "string" or "std::string" is just a class and has various methods to help us to deal with strings but the actual type of the string is "const char[]" or "const char*". But "const char[]" or "const char*" is just a type and doesn't have a methods because it's not a class.
Man u are incredibly clued with so much man, well done.
5 or 10 min tops tutorials are best. Thanks.
Hey Tim can you please continue the series up to SIMD programming??
Interestingly, I didn't need to use the size() or .length function. When watching your videos, you always describe what you're about to do before writing the code, and I pause it and try to do it myself first because I don't want to be stuck in tutorial hell and its my way of making sure i understand fully. But, at first what I tried was in fact the array method with sizeof(stringvariable) / sizeof(stringvariable[0]) which interestingly worked, BUT crashed my program after returning the string. So, instead out of curiousity I wondered if I could just use the number of characters in the string and just tried that. Mine was simply "hey", so I did i < 3; and this worked fine. I assume its because of one of my headers or streams? using namespace std, iostream, and (I like using the Sleep() function). Either that, or maybe visual studio is just newer and has things implemented to make it easier.
Hello Tim great video! Can you do a video on the header iomanip? Itd be very helpful
Tim, could you not "using namespace std;"? It is concidered bad practice, because it defeats the purpose of namespaces which is to avoid naming conflicts. You would be surprised how many things are in that namespace.
No beef, great tutorial!
Also, double quotes are NOT strings, they are arrays of characters. (const char[]/const char*)
bro you are awesome ....! plz cover literally everyting in c++ and also make some project videos
This firsr phrase you said got me in: you can access and modify string characters... I was like what??? Strings were supposed to be immutable in many programming languages 😕
And so, I continue watching cuz TIL
tim these are amazing
will you make a video on your new mac setup?
Tim can u please make a series on 3D modeling in python
Great understanding
Tim? One question: If you learned us c++, can you make an OpenGL tutorial with C or C++. Like you know for the intermediate stuff? :D Would be absolutely gorgeous!
You can take a look at The Cherno.
I am getting an error in my computer , Entry point not found could not locate in the dynamic link library !
plz help
First Comment
Can you make a new playlist on Java please or maybe an android development playlist
OMG first view!!!!!!!!!!!!!!!!!!!!!
Hello Tim, how are you ? :-)
C++
Y U Suddenly Started Learning C++?
Can a c++ pro help me w something
Lol
second lol
First
Your not sorry xD
550th lol