About 94,200 results
Open links in new tab
  1. What does '&' do in a C++ declaration? - Stack Overflow

    } What is the & doing here? Is there some website that explains how & is used differently in C vs C++? This returns a constant reference to a string. So the caller gets to access the returned …

  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. stl - C++ Double Address Operator? (&&) - Stack Overflow

    362 && is new in C++11. int&& a means "a" is an r-value reference. && is normally only used to declare a parameter of a function. And it only takes a r-value expression. If you don't know …

  4. c++ - Do the &= and |= operators for bool short-circuit ... - Stack ...

    Apr 16, 2014 · From C++11 5.17 Assignment and compound assignment operators: The behavior of an expression of the form E1 op = E2 is equivalent to E1 = E1 op E2 except that E1 is …

  5. What does the question mark character ('?') mean in C++?

    What does the question mark character ('?') mean in C++? Asked 16 years, 6 months ago Modified 3 years, 9 months ago Viewed 353k times

  6. Setting an int to Infinity in C++ - Stack Overflow

    Dec 31, 2011 · I have an int a that needs to be equal to "infinity". This means that if int b = anyValue; a>b is always true. Is there any feature of C++ that could make this possible?

  7. c++ - IF statement with logical OR - Stack Overflow

    I'm a beginner to C++ (and programming in general) and I've just begun reading programming: principles and practice using C++ by bjarne stroustrup. I had to write an if statement using a …

  8. c++ - What is the meaning of the auto keyword? - Stack Overflow

    From what I've learned, auto has always been a weird storage class specifier that didn't serve any purpose. However, I've tried what auto does, and it assumes the type of whatever I happen to …

  9. c++ - How does the comma operator work, and what precedence …

    Sep 10, 2008 · 140 Take care to notice that the comma operator may be overloaded in C++. The actual behaviour may thus be very different from the one expected. As an example, …

  10. Explanation of [[nodiscard]] in C++17 - Stack Overflow

    Jun 16, 2023 · class Test { public: [[nodiscard]] int f(int a, int b) const { return a + b; } } The explanation is Adds [ [nodiscard]] attributes (introduced in C++17) to member functions in …