I am wondering if theres another way of executing a function like that:
keep in mind that this is pseudocode
struct MyStruct
{
void onClick(); //function that will be executed
};
std::vector<MyStruct> ahue;
void Button4_OnClick()
{
}
void main()
{
ahue[4].onClick() = Button4_OnClick();
}
do i have to always assign a pointer to function or theres another way, i am asking because in borland c++ builder [im not sure how they do that]
you place a button and theres already a code that executes onClick property. so you dont need to worry about setting pointers to a function etc..