python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Linker cannot find overloaded class operator whith universal type operand
I wanted to overload + operator for my other class and I reached a linker error. I shortened my code to make it easy to review
num.h
#ifndef NUM_H
#define NUM_H
#include <iostream>
#include <...
Tiko7454
Votes: 0
Answers: 0
C++ operator overloading [] and return types
I'm just revisiting C++, and I have a question about overloading of the [] operator, and more specifically why my program doesn't work.
Given the following code in vec.cpp:
double Vec::operator[](unsi...
Henrik Hillestad Løvold
Votes: 0
Answers: 1
How does one use overloaded operators with Generics in C#?
I'm making an attempt to write a class for storing, processing, saving and loading data. I hope that when I finally finish it, it will simplify and mostly automate the process of organizing large numb...
SawmillTurtle
Votes: 0
Answers: 2
Why do we need to return Point object in __add__ function instead of just returning x and y?
I'm studying operator overloading in Python and came accross with this chunk of code. It is not clear to me, why do we return Point(x,y) in add function instead of just returning x and y.
class Point...
Zohrab
Votes: 0
Answers: 1