How to write macros in c++?
I was wondering how I can write macros like in blueprints but in c++?
Thanks in advance :) ~Stefan
asked Jul 15 '19 at 06:04 PM in C++ Programming
Macros in C++ may sometimes be a bit tricky so be careful. You start it with
Macros in C++ are used by preprocessor (stage before compilation and linking). In the example above it will simply replace all
Macros can be more complex:
Example of usage:
will result in:
Experienced C++ developers will suggest you to not use macros as long as possible. Functions and variables are most times a better choice. For example
answered Jul 15 '19 at 07:52 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here