About 11,200,000 results
Open links in new tab
  1. 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 …

  2. c++ - How can I trim a std::string? - Stack Overflow

    } // The remaining functions (trim() et al.) are identical to the new C++11 version std::ptr_fun is needed to disambiguate std::isspace because there is a second definition which supports …

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

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

  6. Why can templates only be implemented in the header file?

    Jan 30, 2009 · Have to recompile foo.cpp every time we change any other file in the program, in case it added a new novel instantiation of MyClass<T> Require that baz.cpp contains …

  7. c++ - How can I convert a std::string to int? - Stack Overflow

    Nov 20, 2014 · I want to convert a string to an int and I don't mean ASCII codes. For a quick run-down, we are passed in an equation as a string. We are to break it down, format it correctly …

  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. Colorizing text in the console with C++ - Stack Overflow

    May 2, 2016 · How can I write colored text to the console with C++? That is, how can I write different text with different colors?

  10. c++ - What is the difference between public, private, and …

    Mar 19, 2015 · Only members/friends of a class can see private inheritance, and only members/friends and derived classes can see protected inheritance. public inheritance IS-A …