Fortune Telling Collection - Horoscope - Which expert uses c++ to help me make a constellation class, such as constructor and overloaded function?

Which expert uses c++ to help me make a constellation class, such as constructor and overloaded function?

Who are the members? Overloading these functions

# contains "stdio.h"

# contains "string.h"

# contains "conio.h"

Classification and combination

{

Public:

Assemble ()

{//Default constructor

m _ Name = NULL

}

C assembly (char *name)

{//constructor overload

int len = strlen(name);

m _ Name = new char[len+ 1];

strcpy(m_Name,Name);

}

~ c assembly ()

{//destructor

if(m_Name! = empty)

{

Delete [] m _ name;

m _ Name = NULL

}

}

//public * * * function

char * GetName();

void set name(char * name);

void SetName(char* name,int len); //Function overload

void print name();

Private:

Char * m _ Name// private member function

int m _ Name _ Len

};

void c constellation::set name(char * name)

{

int len = strlen(name);

if(m_Name! = empty)

Delete [] m _ name;

m _ Name = new char[len+ 1];

strcpy(m_Name,Name);

}

Voidconstation:: set name (char * name, int len)// function overload.

{

if(m_Name! = empty)

Delete [] m _ name;

m _ Name = new char[len+ 1];

strcpy(m_Name,Name);

}

void CConstellation::PrintName()

{

Printf ("class name: cconstellation \ n \ n");

if(m_Name! = empty)

{

Printf ("The name of this object is: %s\n", m _ name);

}

other

{

Printf ("The name of this object is: null");

}

printf(" \ n * * * * END * * * * \ n \ n \ n ");

}

char * CConstellation::GetName()

{

Return m _ Name

}

void main()

{

Assembly temperature ("temperature");

Assembly temperature1;

Temperature 1. SetName(" Star ");

Temperature 1. print name();

At the time of ... printname ();

Set name at … ("change _ temp",12);

At the time of ... printname ();

Printf ("Press any key to exit! \ n ");

getch();

}