If I create a custom class inside source file, and define a function inside that class, then instantiate objects using that class in main() function. Will the every object I create have that function created/stored inside it? If I create 100 objects, wouldn't it mean that I am actually storing/creating that function 100 times inside the object?
I learnt that if I make a function static, the function will be attached to the class instead of every object I create, and the objects we create using that class will not have the function created inside them.
I would like to have clear view of things and explanation of this matter. You should know by now that I am a beginner. So, I'll be grateful if someone can explain me about classes, objects, static key word and their behavior which I said before. Thank you.