+ 4
Because the header defining std::basic_string is most likely (indirectly) included by <iostream> (std::string is a typedef based on std::basic_string<char>). The overload for operator<< for std::cout however is only defined in <string>. In Visual C++'s case, <iostream> includes the implementation-defined <xstring> header, which defines basic_string itself, but like you say, it doesn't define the operator<<.
19th Sep 2020, 8:56 AM
Ayushi
+ 4
I also asked this question last year https://www.sololearn.com/post/69831/?ref=app
19th Sep 2020, 8:58 AM
Ipang
+ 4
Read the other significance of string headerfile you will understood much better. https://www.tutorialspoint.com/c_standard_library/string_h.htm
19th Sep 2020, 9:55 AM
đŸ’«AsđŸ’«
đŸ’«AsđŸ’« - avatar
+ 3
Akash If you're talking about feeds posts, they are not searchable bro ... As for Q&A threads, it's because the search bar matches search query and the saved threads by relevant tags, as we both know many people use arbitrary tags which are irrelevant, e.g. tagging irrelevant languages. But we can't put the blame entirely on them, at least until someone pass them tips on how to write a good and searchable post, they didn't know. And sometimes, a suggestion to fix the thread tags just got abandoned : )
19th Sep 2020, 2:00 PM
Ipang