About 9,540,000 results
Open links in new tab
  1. Using :: (scope resolution operator) in C++ - Stack Overflow

    A fine question, but a little too broad (IMO). That's called the scope-resolution operator, and your search term for further learning is scope. All those names (cout, member functions of A) are …

  2. What does '&' do in a C++ declaration? - Stack Overflow

    I am a C guy and I'm trying to understand some C++ code. I have the following function declaration:

  3. What is the <=> ("spaceship", three-way comparison) operator in …

    Nov 24, 2017 · This is called the three-way comparison operator. According to the P0515 paper proposal: There’s a new three-way comparison operator, <=>. The expression a <=> b returns …

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

  5. 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 &lt;math.h&gt;. However, there doesn't seem to be …

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

  7. How to add element to C++ array? - Stack Overflow

    Nov 13, 2016 · I want to add an int into an array, but the problem is that I don't know what the index is now.

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

  9. Returning multiple values from a C++ function - Stack Overflow

    Aug 19, 2015 · Is there a preferred way to return multiple values from a C++ function? For example, imagine a function that divides two integers and returns both the quotient and the …

  10. Check if a string contains a string in C++ - Stack Overflow

    Feb 26, 2010 · I have a variable of type std::string. I want to check if it contains a certain std::string. How would I do that? Is there a function that returns true if the string is found, and …