[ create a new paste ] login | about

Link: http://codepad.org/JtESpzS1    [ raw code | fork ]

C++, pasted on Jun 9:
#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;
}


Create a new paste based on this one


Comments: