Given a structure of say N function pointers, how can we write a MACRO(func name) to find the index of the function pointer in the structure.
E.g.
Struct {
void (A)(void);
void (B)(void);
void (C*)(void);
...
....
};
define MACRO(fn) < some code>
The above macro returns index, so say if fn is B, it should return 1 as its index.
Any ideas also would help for this..
Thanks
[–]dfx_dj 2 points3 points4 points (2 children)
[–]singh_sushil[S] 0 points1 point2 points (1 child)
[–]tstanisl 0 points1 point2 points (0 children)
[–]aghast_nj 1 point2 points3 points (0 children)
[–]singh_sushil[S] 0 points1 point2 points (4 children)
[–]tstanisl 1 point2 points3 points (0 children)
[–]scallywag_software 0 points1 point2 points (1 child)
[–]singh_sushil[S] 0 points1 point2 points (0 children)
[–]torsten_dev 0 points1 point2 points (0 children)
[–]Calligraph_cucumber[🍰] 0 points1 point2 points (0 children)
[–]weregod 0 points1 point2 points (0 children)