X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/6f5ec5fdc42f96a8fe95f4b846b163d4dc92e0c8..f4125505064e3ff346b31ab9e48f894672e5a7a7:/neighbor.h?ds=sidebyside diff --git a/neighbor.h b/neighbor.h index 52a0ef4..4bd05a9 100644 --- a/neighbor.h +++ b/neighbor.h @@ -9,9 +9,9 @@ public: neighbor(const char* hostname); ~neighbor(); - const char* get_name() const { return name; } - const char* get_ctrl_mbox() const { return ctrl_mbox; } - const char* get_data_mbox() const { return data_mbox; } + const char* get_name() const { return name.c_str(); } + const char* get_ctrl_mbox() const { return ctrl_mbox.c_str(); } + const char* get_data_mbox() const { return data_mbox.c_str(); } double get_load() const { return load; } void set_load(double l) { load = l; } @@ -20,9 +20,9 @@ public: void set_debt(double d) { debt = d; } private: - char* name; - char* ctrl_mbox; - char* data_mbox; + std::string name; + std::string ctrl_mbox; + std::string data_mbox; double load; double debt;