Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
virtual function role
//g++ 5.4.0 #include <iostream> using namespace std; class fruit { public: virtual void eatit(int q=10) { cout<<"fruit::eatit,q="<<q<<endl; } }; class mango:public fruit{ public: virtual void eatit(int q) { cout<<"mango::eatit,q="<<q<<endl; } }; int main() { mango d1; d1.eatit(44); fruit *bp=&d1; bp->eatit(); return 0; }
run
|
edit
|
history
|
help
0
Continuous Sub Set with given sum
sysFork3
Segmented Sieve
tree
selection_sort
big boom!
Rev Fact WIP
HashConPar
project
rotate