Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
~128 People Reached
Favorite Forums
Favorite Tags
c++ x 1
Member Avatar for MjLaali

Is there any way to pass a class as a function pointer. for example: [code=C++] int compare(int a, int b) { return a - b; } void sort(int *ar, int (*pf)(int, int)) { //a sorting algorithm. } class MyClass { bool condition; public: int compare(int a, int b) { if …

Member Avatar for bugmenot
1
128