Help to implement this class:

class Car { private: std::string marka_; unsigned int mskorost_; unsigned int emkost_; public: Car() { marka_ = ""; mskorost_ = 1800; emkost_ = 1800; } Car(const std::string &marka, unsigned int mskorost, unsigned int emkost) { marka_ = marka; mskorost_ = mskorost; emkost_ = emkost; } virtual ~Car() {} void setMarka(const std::string &marka) { marka_= marka; } std::string getMarka() const { return marka_; } 

It is necessary to implement the following operations: input and output of the list, add and delete items, search for items by key. Thank you very much in advance.

  • so what is the actual problem? to implement these operations, start another list of machines, for example, in the form of std::map<> in the class and do all these operations - if something does not work, write - ampawd
  • I think that the task meant to show work with STL containers ... - cpp_user

0