Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
template inhertinace
//Title of this code #include <iostream> using namespace std; class A { public: virtual void foo(int a) { cout << "A_foo" << a << endl;; } }; template<class T> class B : public A { public: virtual void foo(int a) { cout << "B_foo" << a << endl;; } }; int main() { A *val = new B<int>(); val->foo(1); std::cout << "Hello, world!\n"; }
run
|
edit
|
history
|
help
0
Policy based smart pointer
Cours C++
Dar
Procesos estocasticos Beta 2.0
Binary search on sorted array
printAllPathsInMatrix
static property
Using c++11 range-base for loop
003#
sejmie