Hi, I´m making a class with C++ an I need introduced the version of this class in the class name, I don't know if it is possible but... Can I create the class name with a variable or with one define?
Using #define just means that the preprocessor substitutes the text contained in the macro definition for the macro name, wherever it finds it, before the compiler compiles the code.
So if the text substitution results in legal C++ then, yes, it's possible. In this case, substituting "MyClass_1" would result in:
I'm not sure what you're really going to gain from this, though. If you're worried about version control of your software, use a proper version control system - Subversion is free, if you don't want to pay for something sophisticated - instead of obscuring your code.
Thank you very much for both for responding so quickly, you have solved a very big problem. I use MikeyBoy solution, I quip out " from the #define and the compiler substituted the defined variable and the project compile correctly.