Can anyone find the error in th following code? I keep getting these errors and
ID: 3658401 • Letter: C
Question
Can anyone find the error in th following code? I keep getting these errors and I'm confused as to why.
#include <iostream>
using namespace std;
class Sky
{
public:
Sky()
{ cout << "Entering the sky. "; }
Sky(string color)
{ cout << "The sky is " << color << endl; }
~Sky()
{ cout << "Leaving the sky. "; }
};
class Ground : public Sky
{
public:
Ground()
{ cout << "Entering the Ground. "; }
Ground(string c1, string c2) : Sky(c1)
{ cout << "The ground is " << c2 << endl; }
~Ground()
{ cout << "Leaving the Ground. "; }
};
int main()
{
Ground object;
return 0;
}