Here is my source code
#include <IOSTREAM.H>
#include <string.h>
class universal
{
public:
char *getname() {return itsname;}
void setname(char *name) { strncpy (itsname, name, 50 ); }
protected:
char itsname[50];
};
class godublic universal
{
public:
void createland(int land) {
cout << "\nCreating land";
godland = land;}
int getland() { return godland;}
void createpeople(int people) {
cout << "\nCreating people";
godspeople = people;}
int getpeople() { return godspeople;}
protected:
int godland;
int godspeople;
};
int main()
{
god thor = new god;
return 0;
}
I think the error lies in the line
god thor = new god;
but I am not sure why that is not correct someone help me plz