Hey my code is giving segmentation error. Can someone help me out with it
C++
using namespace std;
template
class hello
{
private:
t *a;
t *b;
t *c;
int size;
public:
hello()
{
size = 0;
a = new t[100];
b = new t[100];
c = new t[100];
}
hello(int s)
{
size = s;
a = new t[size];
b = new t[size];
c = new t[2 * size];
cout > a[i];
}
cout > b[j];
}
}
void unionn()
{
for (int i = 0; i >length;
coutc1(length);
c1.display();
c1.unionn();
coutc2(length);
c2.display();
c2.unionn();
return 0;
}
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jul 21, 2021, 6:38 AM EDT
Shweta LodhaRank #31 · 39.8K reputationPosted Jul 14, 2021, 1:29 PM EDT
Suri104 reputationPosted Jul 22, 2021, 12:05 AM EDT