typedef void(Object Sender) TNotifyEvent;
This is what I’m trying to do from Delphi to C++, but it fails to compile with ‘type int unexpected’.
The result should be something I can use like that:
void abcd(Object Sender){
//some code
}
void main{
TNotifyEvent ne = abcd;
}
How do I make such type(of type void)? I’m not very familiar with C++.
If what you want is to define the type of a function that takes an Object as parameter and returns nothing, the syntax would be:
EDIT, as answer to the comment.
Yes, you can define the type of a function, and that type can later be used in different contexts with different meanings: