About 8,860,000 results
Open links in new tab
  1. c++ - Difference between | and || , or & and && - Stack Overflow

    Dec 28, 2015 · Closed 9 years ago. These are two simple samples in C++ written on Dev-cpp C++ 5.4.2:

  2. What is the purpose of using #ifdef and #if in C++?

    The meaning of #ifdef is that the code inside the block will be included in the compilation only if the mentioned preprocessor macro is defined. Similarly, #if means that the block will be …

  3. Regular cast vs. static_cast vs. dynamic_cast - Stack Overflow

    Aug 26, 2008 · I've been writing C and C++ code for almost twenty years, but there's one aspect of these languages that I've never really understood. I've obviously used regular casts i.e. …

  4. What is the C++ function to raise a number to a power?

    In C++ the "^" operator is a bitwise XOR. It does not work for raising to a power. The x << n is a left shift of the binary number which is the same as multiplying x by 2 n number of times and …

  5. Storing C++ template function definitions in a .CPP file

    Separation of implementation details (aka definitions in foo.cpp) from which versions are actually compiled (in foo-impl.cpp) and declarations (in foo.h). I dislike that most C++ templates are …

  6. c++ - How do you loop through a std::map? - Stack Overflow

    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 …

  7. How can I convert int to string in C++? - Stack Overflow

    itoa will be faster than the stream equivalent. There are also ways of re-using the string buffer with the itoa method (avoiding heap allocations if you are frequently generating strings. e.g. for …

  8. What's the difference between constexpr and const?

    What's the difference between constexpr and const? When can I use only one of them? When can I use both and how should I choose one?

  9. What is the meaning of the auto keyword? - Stack Overflow

    32 For variables, specifies that the type of the variable that is being declared will be automatically deduced from its initializer. For functions, specifies that the return type is a trailing return type …

  10. What does the C++ standard say about the size of int, long?

    I'm looking for detailed information regarding the size of basic C++ types. I know that it depends on the architecture (16 bits, 32 bits, 64 bits) and the compiler. But are there any standards for ...