C++ #include - Only partial #include -


Sometimes I go to the situation where I think I only need to include the third party file So that I can use a function or a small square and I feel guilty because I know it has increased in my compilation time because it will make the whole file wrong, when I wanted to have a function. Is there any way to get around this and to include only one function that I want to rewrite the whole thing? "post-text" itemprop = "text">

You have a few options:

  • Just include the header, in fact, There will be no increase in time.
  • Complain to your third-party header provider. Ask them to send a smaller, more modular header.
  • Do not include the header, but declare it as extern that you care about, like extern int GetMeaningOfLife (int rats);

Comments