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
Empty C++ Script
pattern
Zadanie Kolokwium_2011_z4
Interview Prep
Hello world!
co_assign_1_ques_1
sorting
Web Browser History - SET
345325
Korelacja Pearsona lol