-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);
}
今後、コードにテキストを添付してください。 –
あなたが遭遇した具体的な問題は何ですか? –
「他のクラスのプライベート属性を操作する方法」では、おそらくプライベート属性を操作するパブリックメソッドが必要です。 –