Код: Выделить всё
#include
class Node
{
public:
int id;
Node *next;
Node() : id(0), next(nullptr) {}
explicit Node(int id) : id(id), next(nullptr) {}
~Node() {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/77201689/object-does-not-point-to-null-after-deleting[/url]
Мобильная версия