Questions tagged as 'macro'

2
answers

Why use while (0)?

In the Linux code I saw some macros with: do { }while(0) Is there a reason? Because apparently there is no logic to a loop of repetition where the code repeats only once.     
asked by 13.08.2015 / 21:13
1
answer

What does "\" mean in the C ++ header?

I was looking at the MFC header and I do not know what the "\" character means in this context: #define BEGIN_MESSAGE_MAP(theClass, baseClass) \ PTM_WARNING_DISABLE \     
asked by 28.09.2015 / 23:21
1
answer

What are Macros and how to use them?

So far during my C programming course, the only contact I had with macros came from standard libraries and I did not know very well what happened when I called these macros. I would like to know what exactly macros are, how to create one in C /...
asked by 09.06.2015 / 00:06
2
answers

Where to create macros in C?

In terms of good programming practice, if I want to create a macro, for example, a macro that has more or less 30 lines of code, should I implement it in the file .c or .h ? What is good practice?     
asked by 16.07.2015 / 16:01
1
answer

Why have so many parentheses in macro?

Seeing this intrigues you because you need those parentheses that seem unnecessary. What is their functionality? #define SUB(x, y) ((x) * (y))     
asked by 23.03.2017 / 11:37
1
answer

How to restart or continue the script

I've used imacro on these bug sites, and the process works perfectly. but it is not 100%. I need a code to put at the end of the script process that makes it look up the word on the site, if I find it start the process again, otherwise, wait 360...
asked by 21.09.2016 / 23:56
1
answer

VBA Download pdf

I'm developing a macro in excel that through a list of ids and passwords in excel logs into a website and tries to download a pdf. I can log in to the site and navigate to the button that generates the pfd. The problem is that the button trigger...
asked by 26.05.2016 / 17:07
1
answer

How to see the value of a define or macro in gdb?

I have the following line of code: int a = MAX(b,c); How to check the definition of the MAX(b,c) macro? Sometimes the same macro is defined in several different ways in a code (for example, depending on the architecture). This would...
asked by 13.02.2015 / 15:27
1
answer

Macro to automatically fetch images and play in excel

Good afternoon, I have a spreadsheet, where I need to automatically include images. I would like to know if there is any way to create a macro, where you merge the Reference and the color (reference & color) and search in a certain folder the...
asked by 10.04.2018 / 19:48
1
answer

What are the differences between macros and constexpr? When is it preferable to use one instead of the other?

I have not had contact with C ++ for some time, until I decided to create a project to test a solution. As I knew before, I created a macro to use a value as "constant" later, eg: #define MAX_ENTRIES = 10 So Visual Studio recommended that y...
asked by 23.09.2018 / 04:26