我在编译时,他说,错误而编译代码
node.h: In member function ‘void binary_tree::print(node*&, std::ofstream&)’:
node.h:17:10: error: ‘node* node::left_child’ is private
但在node.h,使用MinGW的用于构建和运行成员是公共
class node {
public:
char *word;
int frequency;
node *left_child;
node *right_child; };
得到了一个错误信息。请帮我解决这个问题。
这个错误与'make'有什么关系?这是一个编译器错误,很难告诉你做错了什么,而没有看到它实际上抱怨的代码。 –
你的类定义需要一个尾随的';'。该错误与您显示的代码不符。 – juanchopanza