typedef int(*node_callback_type)(int);
I am using "node_callback_type" above as a function's pointer in order to determine which function I will use within the other function shortcoming below, but when I am using classes and method I was not able to use this resource because the following error "C2440: '=' : cannot convert from 'int (__thiscall shortcoming::*)(int)' to 'int (__cdecl *)(int)'" happens. Nevertheless If I do not use classes and method, then this resource "node_callback_type" works fine!
this peace of code maybe could help you understand that I am trying to explain:
void shortcoming::search(int col, int lin)
{
typedef int(*node_callback_type)(int);
node_callback_type process;
switch(Algoritm)
{
case 0: {
process=new_no_p1; (this is a method)
break;
}
case 1: {
process=new_no_p2; (this is a method)
break;
}
}
...
When I compile this code I get this error below:
error C2440: '=' : cannot convert from 'int (__thiscall shortcoming::*)(int)' to 'int (__cdecl *)(int)'
thanks in advance for any possible help I might receive!
I am using "node_callback_type" above as a function's pointer in order to determine which function I will use within the other function shortcoming below, but when I am using classes and method I was not able to use this resource because the following error "C2440: '=' : cannot convert from 'int (__thiscall shortcoming::*)(int)' to 'int (__cdecl *)(int)'" happens. Nevertheless If I do not use classes and method, then this resource "node_callback_type" works fine!
this peace of code maybe could help you understand that I am trying to explain:
void shortcoming::search(int col, int lin)
{
typedef int(*node_callback_type)(int);
node_callback_type process;
switch(Algoritm)
{
case 0: {
process=new_no_p1; (this is a method)
break;
}
case 1: {
process=new_no_p2; (this is a method)
break;
}
}
...
When I compile this code I get this error below:
error C2440: '=' : cannot convert from 'int (__thiscall shortcoming::*)(int)' to 'int (__cdecl *)(int)'
thanks in advance for any possible help I might receive!