I've found the solution... the solution was:
(this->*pf)(a, b);
XD
I put all code here:
#include <stdio.h>
class lala
{
public:
int f1(int, int);
int f2(int, int);
int (lala::*pf)(int, int);
int call(int, int);
};
int lala::f1(int a, int b)
{
return a+b;
}
int lala::f2(int a, int...
Well i do not code your solution but bring you the basic idea:
1)
line1:
l1.v1: l1.v1.x l1.v1.y l1.v1.z
l1.v2: l1.v2.x l1.v2.y l1.v2.z
line2:
l2.v1: l2.v1.x l2.v1.y l2.v1.z
l2.v2: l2.v2.x l2.v2.y l2.v2.z
with this you can find the two equations of each line:
with the form...
Hehe..... one question, how to do pointer to a function into a c++ class?
I tried:
class lala
{
int f1(int, int);
int f2(int, int);
int (lala::*pf)(int, int);
};
int lala::f1(int a, int b)
{
return a+b;
}
int lala::f2(int a, int b)
{
return a-b;
}
void main()
{
lala l;
int a = 5, b =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.