This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
csce420pine64backup/hw2/hw2pr1/node.h
Alex Huddleston ea50b0cb6a Transferring.
2017-10-25 07:34:40 -05:00

25 lines
612 B
C++

#ifndef NODE_H
#define NODE_H
#include <vector>
using namespace std;
class node
{
private:
node* parent;
int level;
vector<node> children;
public:
void setParent(node* p) { parent = p; };
node* getParent() { return parent; };
void setLevel(int l) { level = l; };
int getLevel() { return level; };
void setChildren(vector<node> c) { children = c; };
void addChild(node n) { children.push_back(n); };
vector<node> getChildren() { return children; };
node getChildrenAt(int i) { return children.at(i); };
};
#endif