Home » Developing U++ » U++ Developers corner » method passed as parameter in function
method passed as parameter in function [message #57587] |
Sun, 03 October 2021 15:04  |
BetoValle
Messages: 204 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
Hi,
These methods below within the class do not allow it to be
compiled this way! is it possible something analogous
so that the fx_ method inside the class
compile on u++? If positive how would it be?
Thanks!
class ab {
public:
String fx1( Value v1){
return "fx1";
}
String fx2( Value v2){
return "fx2";
}
String fx3( Value v3){
return "fx3";
}
String fx_( Value v , String (ab::*func)(Value) ){
return func(v);
}
};
CONSOLE_APP_MAIN
{
Value v=1;
ab f
String x= f.fx_( v, ab::&fx1);
Cout() << x << EOL;
}
|
|
|
|
|
Goto Forum:
Current Time: Thu Apr 24 03:39:47 CEST 2025
Total time taken to generate the page: 0.02346 seconds
|