Please, help me with this task! I don`t know what to join in the code. :S
To write a class Quest (search / mission), which is the mission that the hero can take. To define suitable constructors by default and for general use.
a. Class contains fields name (name), description (description), points (points given) and level (difficulty). The name and description are strings of any size, but the points and the difficulty - integers.
b. Class must contain a map to the target. Karate is presented as two-dimensional array of integers as impassable areas are marked with -1, and the goal of 100. Boxes with values from 0 to 100 are accessible including the figure means the code of the obstacle. For this purpose, there is scope to map the appropriate type and two integers, width and height (width and height the map).
Note: This task is required only to take care of class Quest can store map without doing anything else with it. The card can store both binary and in two-dimensional array of choice.
Write appropriate mutator and member functions access the fields of the class. The card need not have mutator but must have appropriate member functions to access. To redefine operator () with two parameters for access to items on the map.
Take care of the heap class - make appropriate constructors, destructor and operator = Redefine appropriately to no sharing of memory and memory loss (memory leaks).
using namespace std;
char* name, description;
int points, level;
int width, height;
Quest (const Quest&);
Quest& operator = (const Quest&);
name = NULL;
description = NULL;
Quest::Quest(const Quest& oop)
name = new char [strlen(oop.name) + 1];
description = new char [strlen(oop.description) + 1];
strcpy (name, oop.name);
strcpy (description, oop.description);
Quest& Quest::operator =(const Quest& up)
if (this != &up)
delete  name;
delete  description;
name = new char [strlen(up.name) + 1];
description = new char [strlen(up.description) + 1];
strcpy (name, up.name);
strcpy (description, up.description);
delete  name;
delete  decription;
void main ()