Reputation: 90
I have a solution compose of many C++ projects and most of them use the "std::string" class. However, there's not a single #include directive for the header which results in many C2039: 'string' is not a member of 'std' fatal errors. Therefore, whoever previously made the solution must have a way to tell Visual Studio to auto-include the header. How can I do such things?
Upvotes: 2
Views: 87
Reputation: 90
Based on VTT's comment, I found that you can "Force include" file in Configuration Properties => C/C++ => Advanced
and add "(header name)" to the Forced include File
field. That's one way to do it.
Upvotes: 1