STL std::string, char*, const char*, and string literals in C++ | Modern Cpp Series Ep. 112

preview_player
Показать описание

►Lesson Description: In this lesson I show you how to get started with the std::string in the STL. std::string is something we have used before, but it is actually a specialization of basic_string. By understanding how string works, you'll actually see how many of the containers and data strutures in C++ work.

►Please like and subscribe to help the channel!
Рекомендации по теме
Комментарии
Автор

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 !

yvickmiossec
Автор

@17:12 we might want to do this to get the address . std::cout << (void*)(s.data()) << '\n'; and std::cout << (void*)(&s[0]) << '\n'; Thanks for the great video!

thestarinthesky_
Автор

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.

gandab
Автор

Nice explanation.
How to setup vim for c++ development?

nematjonabdulloev
Автор

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?

zdspider
Автор

Hey mike could we have a session about how to trace the allocation of memory during runtime for every method

moatasemelsayed
Автор

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

TheOldRoots
Автор

Hi Sir, Please Explain using namespace std::string_literals or using namespace std::literals

JaswinderSingh-dzui
Автор

If we need Japanese char how to use std::string for jp_char like : std::Jstring . Thanks.

__hannibaal__
Автор

Just uniform initialize that string already.

ughadunk