小编Iga*_*tor的帖子

用C++实现状态机如何?

我是C++的新手.

如何在C++中实现状态机?

我只得到消息,应该知道下一个状态.

我需要使用什么样的结构?

谢谢,伊加尔

c++

3
推荐指数
3
解决办法
8358
查看次数

我是C++的新手.请帮我链接列表(要添加哪些功能)?

亲爱的大家;

嗨,我只是C++的初学者; 请帮我理解:

Linked list类中应该有哪些函数?我认为应该重载运算符<<和>>; 请帮我改进代码(样式,错误等),谢谢你提前.有约色.

编辑:这只是第一阶段,下一个将(希望)与模板.

请查看整数列表的小代码(包含MyNODE.h和ListDriver1.cpp); MyNODE.h

    // This is my first attempt to write linked list. Igal Spector, June 2010.

#include <iostream.h>
#include <assert.h>

//Forward Declaration of the classes:
class ListNode;
class TheLinkedlist;

// Definition of the node (WITH IMPLEMENTATION !!!, without test drive):


class ListNode{
 friend class TheLinkedlist;
public:
 // constructor:
 ListNode(const int& value, ListNode *next= 0);
 // note: no destructor, as this handled by TheLinkedList class.

 // accessor: return data in the node.
// int …
Run Code Online (Sandbox Code Playgroud)

c++ linked-list member-functions

2
推荐指数
1
解决办法
706
查看次数

标签 统计

c++ ×2

linked-list ×1

member-functions ×1