linear-cpp
linear-cpp copied to clipboard
Is #include <string> header in chapter 3 necessary?
Hi,
I just finished chapter 3 and I noticed my IDE has greyed out the header - #include
I can't see anywhere std::string is used in the program. Is it being used somewhere I haven't noticed and my IDE thinks it is unnecessary because the header is implicit in - #include
If std::string is used, is it considered good practice to make headers explicit, rather than implicit in C++?
You're right, the include does not appear necessary; I suspect this is just a copy-paste from the previous chapter. Thanks for pointing it out!