什么是c ++中的节点类以及如何实现它? [英] What is a node class in c++ and how to implement it?

查看:359
本文介绍了什么是c ++中的节点类以及如何实现它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好:)

在阅读一些C ++文章时.我碰到过节点类"一词.我试图谷歌约相同.但是不幸的是没有得到完整的信息,也不清楚.

如果某人对Node类有很好的了解....如何实现它.在什么地方真正有用等等等等.请与示例分享您的知识.

在此先感谢:)

祝您学习愉快:)

Hi Everyone :)

While going through some C++ articles. I came across the term "Node Class". I tried to google about same. But unfortunately didn''t get complete information and also it was not clear.

If somebody has good understanding of Node class....How to implement it..where exactly it is useful etc etc. Please share your knowledge with EXAMPLE.

Thanks in advance :)

Happy Learning :)

推荐答案

请在此处查看:
http://www.globalguideline.com/interview_questions/Answer.php?a=What_is_a_node_class_in_c [ ^ ]

尽管这取决于上下文....
请注意,也许还有别的东西...
例如树,列表,数组,向量等的节点.
例如:
http://en.allexperts.com/q/C-1040/Doubly-Linked- List.htm
Please see here:
http://www.globalguideline.com/interview_questions/Answer.php?a=What_is_a_node_class_in_c[^]

Although it depends on the context....
Notice, there may be something else too...
For example the Node of tree, list, array,vector and etc.
Ex:
http://en.allexperts.com/q/C-1040/Doubly-Linked-List.htm


在面向对象编程(OOP)中,您可以构建类的树.
例如,可能有一些类A,它是从类B继承而来的,而类B是从类C继承而来的.

请参见下图:
http://www.codeproject.com/KB/cpp/386982/standard_composite.GIF

类的层次结构,包括一个父类和几个子节点.

1)Worker是Node
2)管理者是节点

请阅读有关C ++或C#或Java中的继承的信息.
In object oriented programming (OOP) , you can build a tree of classes.
For example might be some class A, which is inherited from the class B ,class B which is inherited from the class C.

Please see following image:
http://www.codeproject.com/KB/cpp/386982/standard_composite.GIF

The hierarchy of classes including one parent class and several child nodes.

1) Worker is Node
2) Manager is Node

Please read about the inheritance in C++ or C# or Java


节点类只是表示数据结构中节点的类.列表,树,地图等数据结构由所谓的节点组成.这种以C ++类的形式表示的节点称为节点类.就这么简单.

如果您不理解节点"一词的含义,请继续阅读有关数据结构的信息.可能会为您澄清一些事情.
A node class is simply a class representing a node in a data structure. Data structures like lists, trees, maps, etc. consist of so-called nodes. And a representation of such a node in form of a C++ class is called a node class. As simple as that.

If you don''t understand what is meant my the term "node", go ahead and read about data structures. That will probably clarify things for you.


这篇关于什么是c ++中的节点类以及如何实现它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆