python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How can I use a macro inside another macro in order to concat the definition of the macro to something? C/C++
I am trying to make a macro that will be take a predefined prefix and concatenate it to the wanted function name in the argument of the macro, but I have been unsuccessful.
For example, while this is ...
Tal Afek
Votes: 0
Answers: 1
Why do ffmpeg developers use "runtime if" with macrofied condition?
I'm looking to FFmpeg source code and I find it weird to use weird code like this:
#define MACRO 0
void func(void)
{
if (MACRO)
{
//code
}
}
Is there any reason to use "if&q...
Pavel Korotkevich
Votes: 0
Answers: 1
inline ARMv7-M assembly code into c using gcc and macros
I have this code that works fine:
void function( void )
{
__asm volatile
(
" ldr r3, .ADDRESS \n"
" mov r2, %0 \n"
&...
mastupristi
Votes: 0
Answers: 1
How to convert a log2(n) based value to n shifts in a #define statement in C?
I have a definition of the following type in C:
#define NUM_OF_CHANNELS 8
I want to refer to this definition and use it also for shift operations, such as
a = b >> 3
The value 3 comes from log...
Hansel
Votes: 0
Answers: 2