Mike’s stuff is excellent. I have learnt many, many things from his videos. Very surprised at the number of views: IMHO, this channel is a fantastic ressource for the programming enthousiast. Thank you Mike !
Nice and simple explanation for new programmers going into C++ especially with no C experience beforehand. I noticed that you can get the first char address with something like const char* first_char = the_string_var.data(); Then cout &first_char.
s.data() is returning the internal pointer to the string class. Since that memory has a location, it is an lvalue (i.e. it's not something temporarily constructed.)
@@MikeShah Thanks a lot! I completely misunderstood what s.data() was actually doing. Didn't realise it was literally giving us the pointer to the start of the string. Someone needs to RTFM! Haha! Thanks for all your content.
13:46 Could you explain a bit more in detail what "extern "C"" does? Because "extern" is used to tell the compiler that the variable is located in a different translation unit, so it compiles it, then the linker is supposed to look for it _after_ the compiler is done. So what is "C" supposed to be? A string? There's a special rule for it or something?
The "C" part tells the compiler not to mangle the name and match the C naming convention when loading functions. This is useful when building libraries that may be called from C code.
Hello Mike! Do you have any video that talks about handling very large numbers in c++? Like if I want to store 10000! (which cannot even be stored in an unsigned long long) and use it in some computation for example
I believe Japenese characters would be found in UTF-8. Depending on if there is one character or two characters to represent the character set, that might vary whether std::string works with Japanese characters -- and also note your terminal needs to be able to output the UTF-8 encoded characters..
Awesome channel! I started to use C++ in Cython a while ago, and your videos have helped me a lot! Thx!
Cheers -- I'm happy to hear that!
@17:12 we might want to do this to get the address . std::cout
Cheers!
Mike’s stuff is excellent. I have learnt many, many things from his videos. Very surprised at the number of views: IMHO, this channel is a fantastic ressource for the programming enthousiast. Thank you Mike !
Cheers, thank you for the kind words 🙂
Nice and simple explanation for new programmers going into C++ especially with no C experience beforehand. I noticed that you can get the first char address with something like const char* first_char = the_string_var.data(); Then cout &first_char.
Cheers!
Hey Mike! Referring to 16:52 :
If s.data() implies some function return from the string class, is that not a temporary r-value to start with?
s.data() is returning the internal pointer to the string class. Since that memory has a location, it is an lvalue (i.e. it's not something temporarily constructed.)
@@MikeShah Thanks a lot! I completely misunderstood what s.data() was actually doing. Didn't realise it was literally giving us the pointer to the start of the string. Someone needs to RTFM! Haha! Thanks for all your content.
@@safatkhan676 cheers! No worries at all
13:46 Could you explain a bit more in detail what "extern "C"" does? Because "extern" is used to tell the compiler that the variable is located in a different translation unit, so it compiles it, then the linker is supposed to look for it _after_ the compiler is done. So what is "C" supposed to be? A string? There's a special rule for it or something?
The "C" part tells the compiler not to mangle the name and match the C naming convention when loading functions. This is useful when building libraries that may be called from C code.
Nice explanation.
How to setup vim for c++ development?
Cheers! My VIM is pretty plain, but this may help for larger longer term projects: ruclips.net/video/IR6pfkqjbw8/видео.html
Hello Mike! Do you have any video that talks about handling very large numbers in c++? Like if I want to store 10000! (which cannot even be stored in an unsigned long long) and use it in some computation for example
I don't at this time -- that's a nice idea, and I remember doing this long ago for a homework assignment :)
Hi Sir, Please Explain using namespace std::string_literals or using namespace std::literals
May consider that for a future video -- cheers
Hey mike could we have a session about how to trace the allocation of memory during runtime for every method
Yup, will likely come in my C programming series first then a variation using C++ in this series next.
Thank you for your precious effort it is very helpful 😍
Just uniform initialize that string already.
If we need Japanese char how to use std::string for jp_char like : std::Jstring . Thanks.
I believe Japenese characters would be found in UTF-8. Depending on if there is one character or two characters to represent the character set, that might vary whether std::string works with Japanese characters -- and also note your terminal needs to be able to output the UTF-8 encoded characters..