About 64,200 results
Open links in new tab
  1. What are the basic rules and idioms for operator overloading?

    Dec 12, 2010 · The bitwise shift operators << and >>, although still used in hardware interfacing for the bit-manipulation functions they inherit from C, have become more prevalent as …

  2. C++ -- How to overload operator+=? - Stack Overflow

    I wonder why these operators (e.g. operator+=) aren't implemented by default when you implement the related operator (like operator+). You know, like what happens when you …

  3. What's the right way to overload operator== for a class hierarchy?

    In general I think the base class should define a operator== overload (internally or via friend class doesn't matter) which check typeid equality and calls an abstract virtual "equals" function …

  4. Is it possible to overload operators in C? - Stack Overflow

    There is no such thing as operator overloading in C. You cannot define custom operators to work with your structs, in any way, at all, in C. Operator overloading is something you do in C++, it …

  5. How can I properly overload the << operator for an ostream?

    81 Assuming that we're talking about overloading operator << for all classes derived from std::ostream to handle the Matrix class (and not overloading << for Matrix class), it makes …

  6. Does C support function overloading? - Stack Overflow

    Feb 28, 2010 · I just want to know if C supports function overloading? As we use system functions like printf() with different number of arguments. Help me out.

  7. c++ - Overloading member access operators ->, .* - Stack Overflow

    I understand most operator overloading, with the exception of the member access operators -&gt;, .*, -&gt;* etc. In particular, what is passed to these operator functions, and what should be retur...

  8. C++ operator== overloading - Stack Overflow

    Possible Duplicate: What are the basic rules and idioms for operator overloading? What is the differences between the following ways to overload operator== ? // stroustrup way friend bool …

  9. How to achieve function overloading in C? - Stack Overflow

    An object-oriented way to emulate function overloading in C that doesn't rely on using preprocessor macros consists of creating a struct for each parameter list that you want your …

  10. Overloading operators in typedef structs (c++) - Stack Overflow

    Dec 27, 2012 · I want to make a typedef struct called pos (from position) that stores coordinates x and y. I am trying to overload some operators for this struct, but it does not compile. typedef …