C++ Macros - What Can They Do?

Started by
0 comments, last by Beefcake 24 years, 6 months ago
Is there some technique that would allow you to make a macro that you define an "Extern" variable in a .h file, and it will have it fake the definition in any cpp file. Let me demonstrate a small example of what i mean #define SetExternVariable( type, name ) extern type name; \ OpenCPP( blah.cpp ); type name; CloseCPP( ); I know this won''t work but that should help describe what i mean. Thanks Sean Hanna
Advertisement
I don''t get what you''re accomplishing by doing that.

Actually, I''m not even sure what you''re trying to do.

This topic is closed to new replies.

Advertisement