Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
base base
//g++ 5.4.0 #include <iostream> using namespace std; class base{ public:void basefun(){cout<<"frm base"<<endl; } }; class derr:public base{ public:void basefun(){cout<<"frm derr"<<endl; }}; void somefunc(base *baseobj){ baseobj->basefun(); } int main() { base baseobject; somefunc(&baseobject); derr derrobject; somefunc(&derrobject); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Funny Saying
Simulare 2022
4149 coj WIP
Вывод элементов массива
Square of maximum
FInd rows with maximum no of 1's
Dijkstra
Binary search2
Polimorfizm :)
Ploshtina na krug
Please log in to post a comment.