[ create a new paste ] login | about

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

C++, pasted on Sep 7:
#include <iostream>

using namespace std;

template <class T> void func(vector<T> s)
{
cout << "hello s" << endl;
}

template <class T> void func(vector< vector<T> > d)
{
cout << "hello d" << endl;
}

void call_func(vector<int> s)
{
func(s);
}



int main(void)
{
vector<int> s;
vector< vector<int> > d;

func(s);
func(d);

call_func(s);

return 0;
}


Output:
1
2
3
hello s
hello d
hello s


Create a new paste based on this one


Comments: