Xorifelse
I'd love to elaborate about discussions...........
- Reaction score
- 87
I'm playing around with c++, and noticed constructors exist in classes.
However, is their a simpler way to execute a function automatically when you include a cpp \ h file?
I'm trying to make a server application, and just wanted to debug some results automatically.
This includes displaying defined constants in my file, but I don't really want to make a function call from main().
And I don't mean including the file from withing main(), I just want a simple private constructor or something called automatically.
However, is their a simpler way to execute a function automatically when you include a cpp \ h file?
I'm trying to make a server application, and just wanted to debug some results automatically.
This includes displaying defined constants in my file, but I don't really want to make a function call from main().
And I don't mean including the file from withing main(), I just want a simple private constructor or something called automatically.