Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
funpointer
//g++ 5.4.0 #include <iostream> using namespace std; int add(int a, int b) { return a+b; } int sub(int a, int b) { return a-b; } int main() { int (*ptr)(int ,int ); int ch=0; cin>>ch; if(ch==1) { ptr=&add; } else { ptr=⊂ } int d; d=(*ptr)(1,2); cout<<d; }
run
|
edit
|
history
|
help
0
Stream3
5345
Print Euler Path
bharat
MergeSort
Destroy It!
congruence modulo equations (together with a simple BigInteger class)
Test1
2018JanSilv2
Mr