Don't think you can pass any parameter unless you create a point in your main.
template<class T>
void my_list<T>::show_sllist(my_node<T>* p)
{
if(p!=0)
{
cout<<p->data;
show_sllist(p->next);
}
}
Would i have to create a pointer of type my_node in main to show the list.
#include <iostream>
using namespace std;
#include "my_list.h"
#include "my_list.cpp"
using list::my_list;
int main()
{
//Test 1
cout<<"TEST1\n";
my_list<double> a;
a.push_back(1.3);
a.push_back(2.4);
cout<<"Object1:\n";
a.show_sllist();
my_list<double> b(a);
cout<<"Object2:\n";
b.show_sllist();
cout<<endl;
//Test 2
/*cout<<"TEST2\n";
my_list<int> c;
c.push_back(1);
c.push_back(2);
cout<<"Object1:\n";
c.show_list();
my_list<int> d(c);
cout<<"Object2:\n";
d.show_list();
my_list <int>e;
e=d;
e.push_back(10);
cout<<"Object3:\n";
e.show_list();*/
return 0;
}