Код: Выделить всё
#include
#include
#include
#include
// Simulated deserialization target
class Tag {
public:
// Tag has no default constructor; this is intentional to preserve design integrity.
Tag(std::string name, int priority) : name(name), priority(priority) {}
void display() const {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79751339/how-can-c-classes-without-default-constructors-be-cleanly-deserialized-in-cust[/url]
Мобильная версия