About 11,400,000 results
Open links in new tab
  1. Is it possible to use a if statement inside #define?

    You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. What's reputation and how do I …

  2. c - #define or enum? - Stack Overflow

    Jun 29, 2010 · Possible Duplicate: Why use enum when #define is just as efficient? When programming in C, is it better practice to use #define statements or enums for states in a state …

  3. What is define([ , function ]) in JavaScript? - Stack Overflow

    What is define ( [ , function ]) in JavaScript? [duplicate] Asked 12 years, 4 months ago Modified 2 years, 9 months ago Viewed 240k times

  4. What is the difference between #define and const? [duplicate]

    The #define directive is a preprocessor directive; the preprocessor replaces those macros by their body before the compiler even sees it. Think of it as an automatic search and replace of your …

  5. How do I define a function with optional arguments?

    How do I define a function with optional arguments? Asked 13 years, 8 months ago Modified 1 year, 3 months ago Viewed 1.2m times

  6. Why do most C developers use define instead of const?

    Mar 4, 2017 · #define simply substitutes a name with its value. Furthermore, a #define 'd constant may be used in the preprocessor: you can use it with #ifdef to do conditional compilation …

  7. What is the purpose of the #define directive in C++?

    May 10, 2010 · 0 in C or C++ #define allows you to create preprocessor Macros. In the normal C or C++ build process the first thing that happens is that the PreProcessor runs, the …

  8. #define FOO 1u 2u 4u ... What does 1u and 2u mean?

    I'm working with the HCS12 MCU, and this was part of the library. I'm just wondering what the 1U, 2U, 4U, 8U... means in this code. I'm still learning how to use classes, please try to explain thi...

  9. Define a 'for' loop macro in C++ - Stack Overflow

    Perhaps it is not good programming practice, but is it possible to define a for loop macro? For example, #define loop(n) for(int ii = 0; ii < n; ++ ii) works perfectly well, but does not give ...

  10. c++ - Declaring a function using #define - Stack Overflow

    Jul 9, 2018 · The #define version is still a macro. The code is expanded at the invocation site. It has all the expected problems (with macros) including namespace pollution and unexpected …