-2
// this is the first point class header
class Point : public CWaypoint{
public: //temporarily
string m_description;
public:
Point();
virtual ~Point();
void print();
Point(string name, string description, double latitude, double longitude);
void getAllDataByReference(string& name,string& description, double& latitude,double& longitude);
};
// This is the database class header
class Database
{
private:
Point m_POI[10]; // Point is the other class
int m_noPoi;
public:
Database();
virtual ~Database();
void addPoI(string name,string description,double latitude,double longitude);
Point * getPointerToPoi(string name);
}
Пожалуйста, в дальнейшем, сопроводите ваш код некоторым текстом. –
Каковы конкретные проблемы, с которыми вы столкнулись? –
«Как манипулировать частным атрибутом другого класса» вам, вероятно, нужны общедоступные методы, которые управляют частными атрибутами. –