On Mar 25, 2010, at 10:42 AM, Manohar Vanga wrote:
Does anyone know if the following code can be made to work? Alternative would also be appreciated:#define INIT_MODULE(id) \ #if (id == 0)\ #error "Invalid ID"\ #else\ #define __MODULE_ID__\ int __module_id = id;\ #endifThe __MODULE_ID__ is required later on in the preprocessing. Any suggestions? I would hate to have to sit and write my own preprocessor :-/
Can you please tell what exactly you are trying to achieve here? Is this C or C++? Can you use templates instead of preprocessor?
Thanks Manohar
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

