Is it at all possible in c/c++ to do something like to following:
#define (_asm int 3;) (exit(1))
So that everywhere in my code this line will be replaced at compile time.
I know this is bad practice but is it possible.
cheers
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could do a global search and replace with your programming editor (or IDE) of choice and change
_asm int 3to e.g.FOO, and then define a macroFOOlike this: