About 8,840,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. c++ - How do I find the length of an array? - Stack Overflow

    Is there a way to find how many values an array has? Detecting whether or not I've reached the end of an array would also work.

  4. 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. …

  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. 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 …

  7. How can I get current time and date in C++? - Stack Overflow

    The ffead-cpp provides multiple utility classes for various tasks. One such class is the Date class which provides a lot of features right from Date operations to date arithmetic.

  8. 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 …

  9. 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 …

  10. 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?