About 8,270,000 results
Open links in new tab
  1. c++ - What does the explicit keyword mean? - Stack Overflow

    33 Cpp Reference is always helpful!!! Details about explicit specifier can be found here. You may need to look at implicit conversions and copy-initialization too. Quick look The explicit specifier …

  2. What does the "::" mean in C++? - Stack Overflow

    Mar 17, 2011 · What does this symbol mean? AirlineTicket::AirlineTicket ()@PaulR Not everyone who arrives upon this question is looking to learn C++. I, for example, just happened to be …

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

  4. How to use the PI constant in C++ - Stack Overflow

    Nov 13, 2009 · I want to use the PI constant and trigonometric functions in some C++ program. I get the trigonometric functions with include <math.h>. However, there doesn't seem to be …

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

  6. c++ - How can I iterate over an enum? - Stack Overflow

    Nov 4, 2008 · I just noticed that you can not use standard math operators on an enum such as ++ or +=. So what is the best way to iterate through all of the values in a C++ enum?

  7. c++ - Inheriting constructors - Stack Overflow

    If your compiler supports C++11 standard, there is a constructor inheritance using using (pun intended). For more see Wikipedia C++11 article. You write:

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

  9. When to use extern in C++ - Stack Overflow

    I'm reading "Think in C++" and it just introduced the extern declaration. For example: extern int x; extern float y; I think I understand the meaning (declaration without definition), but I wonde...

  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?