This commit is contained in:
Сергей Маринкевич
2025-07-23 13:17:26 +07:00
parent 0912566c5f
commit f994303cb5
5 changed files with 12 additions and 18 deletions
+2 -3
View File
@@ -1,4 +1,4 @@
#include "nodes/SimpleNode.h" // Путь изменен
#include "nodes/SimpleNode.h"
#include <iostream>
void printTree(const NodePtr& startNode, int indent = 0) {
@@ -14,7 +14,6 @@ void printTree(const NodePtr& startNode, int indent = 0) {
int main() {
std::cout << "Entering main scope...\n\n";
// Начало новой области видимости
{
auto root = std::make_shared<SimpleNode>("Root");
auto child2 = std::make_shared<SimpleNode>("Child2");
@@ -43,7 +42,7 @@ int main() {
std::cout << "\nTree after scope out:\n";
printTree(root);
} // <--- КОНЕЦ ОБЛАСТИ ВИДИМОСТИ
}
std::cout << "\nExited main scope. All smart pointers destroyed.\n";