About 806,000 results
Open links in new tab
  1. What does the "->" operator mean in C++? - Stack Overflow

    Feb 12, 2012 · as with almost all operators in C++ you should make the addendum that both * and -> can be overloaded so (*a).b and a->b although usually the same have no guarantee of …

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

    Mar 17, 2011 · In C++ the :: is called the Scope Resolution Operator. It makes it clear to which namespace or class a symbol belongs. It makes it clear to which namespace or class a …

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

    in CLang (at least the most recent versions) this extension is also available. It's available even with C++11 flag turned off in a qmake project. So an expression like int x = 1+1 ? : 0 ; correctly …

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

    This is such a large number that no other number (at least in c++) can be greater than it. But obviously since we are converting to a type (int), which at max can hold a value 2147483647. …

  5. What are bitwise shift (bit-shift) operators and how do they work?

    Also note that C and C++ do not distinguish between the right shift operators. They provide only the >> operator, and the right-shifting behavior is implementation defined for signed types. The …

  6. c++ - How do I best silence a warning about unused variables?

    In C++11 an alternative form of the UNUSED macro could be formed using a lambda expression(via Ben Deane) with an capture of the unused variable: #define UNUSED(x) …

  7. Using bitwise operators for Booleans in C++ - Stack Overflow

    Aug 24, 2008 · IIRC, many C++ compilers will warn when attempting to cast the result of a bitwise operation as a bool. You would have to use a type cast to make the compiler happy. Using a …

  8. c++ - What are the rules for calling the base class constructor ...

    Apr 4, 2021 · People see that and put it in loops and wonder why writing a bunch of lines to a text file is 5x-20x slower "in C++" than using fprintf. TL;DR: Use "\n" (added to an existing string …

  9. c++ - When should static_cast, dynamic_cast, const_cast, and ...

    Here is a short quote from Bjarne Stroustrup's (the author of C++) book The C++ Programming Language 4th edition - page 302. This C-style cast is far more dangerous than the named …

  10. c++ - how to convert from int to char*? - Stack Overflow

    Jun 1, 2012 · It's a non-standard function, thus you should avoid using it. Check this question too: Alternative to itoa() for converting integer to string C++? Also note that writing C-style code …

Refresh