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)
Why We Couldn't Create Pointer To Friend Functions Defined In A Class?
struct A
{
friend void f();
};
void f() {}
We could define a pointer to the f():
using FType = void(*)();
FType ptr_to_f = f;
But if we move the definition of the f() into the A, then we couldn't...

Ghasem Ramezani
Votes: 0
Answers: 0
Can't access private member in templated overloaded operator
In this code, why is it not possible to access the private field of my class in the operator overload ?
(Note that this is only a MRE, not the full code)
template <typename T>
class Frac
templa...
CoJa
Votes: 0
Answers: 2
Generic friend operator== overload
I am currently stuck on a problem that I can't solve. I am a beginner in the world of c++.
For a homework, I have to create a generic class to represent a fraction like 5/6 or 11/4. This class is gene...
CoJa
Votes: 0
Answers: 2
undefined reference for overloaded cout
I was trying if I could replace my code for 2-, 3- and 4--dimensional vectors into 1 class, so instead of having vec2<T>, vec3<T> and vec4<T>, use vecN<typenameT,unsignedS>.
Th...

alle_meije
Votes: 0
Answers: 0