Untitled

 avatar
unknown
plain_text
a month ago
380 B
5
Indexable
#include <iostream>
#include <cmath>
#include <vector>
#include <array>
using namespace std;

class Tree
{
public:
	int value = 0;
	int* parent = nullptr;
	int* child1 = nullptr;
	int* child2 = nullptr;
};

int main()
{
	Tree tree;
	tree.child1 = new int(2);
	tree.child2 = new int(69);
	cout << tree.value << " " << *tree.child1 << " " << *tree.child2;

}
Editor is loading...