codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include <iostream> #include <vector> using namespace std; template <typename T> class A { public: vector<T*> viewports; A(vector<T*> arg); }; template <typename T> A<T>::A(vector<T*> arg) { viewports = arg; } int main () { vector<int*> stuff; stuff.push_back(new int(1)); stuff.push_back(new int(2)); A<int> a(stuff); cout << a.viewports.size() << endl; }
Private
[
?
]
Run code
Submit