0
include library loads all or just components used, in the resulting binary?
5 Answers
+ 1
If you include all, it loads all.
That is why you need to be specific of the library needed in your code before you include it.
0
franky how can include just what u need?
0
For example... In your code, you are using a string data type.
string my Name = '' Eden '' ;
It is sure that you will need to include the string..
#include <string>
Or let's say, you are using a math function in your code, you will need to include the math library to perform maths functions in your code.
#include <cmath>
NB: when you code in a compiler, you will get some red underlined flag on restricted words if you don't include their libraries. So you hand pick those flags then include their libraries to remove the red underlined flags.
0
i know all that, my question is if there is some way to include just the functionality you are using from a library instead of all the library
0
I understand you now. Well, Anything is possible but to me, I have never seen it done before. You will have to include the library to have access to every component in it.
Have you ever tried opening an include file? It possibly looks like a class... Just saying