Hello everyone!
I have to create a reduced version of my program that uses only ~30% of the code. What is the best practice to do that? I am thinking about defining a preprocessor symbol and using it extensively in my code to exclude certain parts. But I am hesitating because this feels a little outdated.
Is there a more elegant/modern way to do this?
Thanx you.
reduced version of program using 30% of the code
Re: reduced version of program using 30% of the code
Hi,
Do you mean like a licensed vs non-licensed vrsion?
Thank you.
Do you mean like a licensed vs non-licensed vrsion?
Thank you.
-
- Ultimate wxWidgets Guru
- Posts: 539
- Joined: Fri May 22, 2009 8:52 am
- Location: Bremen, Germany
Re: reduced version of program using 30% of the code
No, what I mean is: The full version has some creating, editing and viewing features of custom files, the reduced version should only be a viewer.
Re: reduced version of program using 30% of the code
I can't think of any better way. If it's ok, that the actual code parts remain in the executable, it might be less effort if you use conditional compilation to only remove the GUI elements for the things the user should not have access to.
Use the source, Luke!
Re: reduced version of program using 30% of the code
1.preprocessor
2. void interfaces implementaions.
if you have interfaces and their implementations, then you could define void implementations(which do nothing) and use them in restricted version.
2. void interfaces implementaions.
if you have interfaces and their implementations, then you could define void implementations(which do nothing) and use them in restricted version.
ubuntu 20.04, wxWidgets 3.2.1