登录
首页 » c,c++ » 状态机

状态机

于 2022-02-05 发布 文件大小:1.06 kB
0 120
下载积分: 2 下载次数: 1

代码说明:

/*  *状态机实现由switch和函数指针两种方式:  在实现有限状态机时,使用switch语句是最简单也是最直接的一种方式,其基本思路是为状态机中的每一种状态都设置一个case分支  一个函数指针数组可以像下面这样声明: void (*state[MAX_STATES]) (); 如果知道了函数名,就可以像下面这样对数组进行初始化。  extern int a(),b(),c(),d(); int (*state[]) ()={a,b,c,c}; 可以通过数组中的指针来调用函数:  (*state[i]) ();  * */

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • opencv实现简单的电脑摄像头的调用
    其中将调用摄像头和canny检测因子结合,将图像的每一帧提取出来进行处理。
    2022-05-30 17:53:16下载
    积分:1
  • 最大子团问题
    #include #include #define N 20 struct code { int a[N][N]; int n; int x[N]; int bestx[N]; int cn; int bestn; }Y; int count; void Backtrack(int i) { int OK=1; int j; if(i>Y.n) { for(j=1;j
    2022-01-27 23:45:31下载
    积分:1
  • C# 仿office2007 tab效果 完整winform示例源码下载
    C# 仿office2007 tab效果 完整winform示例源码下载
    2013-10-02下载
    积分:1
  • 串口通讯-发送字符串
    CC2530模块上串口连上电脑,CC2530不断向串口发送数据,这时候电脑在电脑打开串口助手,设置好波特率,然后就可以在串口助手看见模块发送的数据
    2022-01-25 16:04:59下载
    积分:1
  • C语言全套课件与教学资料-哈工大
    C语言全套课件与教学资料-哈工大
    2021-05-06下载
    积分:1
  • 行人检测代码
    在VS2013+openCV2.4.9平台上运行,主要是利用提取图像的HOG特征,进行梯度运算,计算每一个梯度的特征值
    2022-04-30 05:24:31下载
    积分:1
  • SilverTreeContainer
    老外写的在WPF下显示树状结构的控件,包括 GraphLayout和Panel。(This article includes two very different basic assemblies and a couple of test assemblies for WPF. The first basic assembly is GraphLayout which implements the Reingold-Tilford algorithm, described here, to determine the placement of nodes in a tree structure. This tree is structured as a top down tree with the root at the top and the leaves at the bottom. This algorithm is entirely independent of any actual drawing of those nodes and so can be used for any purpose where such positioning is required. It includes options for vertical justification for nodes, collapsing of nodes, distance between sibling nodes and distance between non-sibling nodes. This assembly is not WPF specific and could easily be used to produce a GDI+ tree drawer (though I haven t included any here). It also includes a list of endpoints for lines which can be drawn as connectors between nodes. Currently, these lines are simply straight lines from the bottom center of the parent node to the top center of the child )
    2014-02-14 09:07:42下载
    积分:1
  • PCM编码C++实现源码
    用c++实现了一个简单的将量化后的音频幅值,转化为二进制编码的程序。 对于初学pcm编码有用处,可以参考。
    2022-06-14 19:00:16下载
    积分:1
  • 自矫正自适应控制算法
    自矫正控制算法程序,自矫正控制是比较经典的自适应控制方法,适合需要学习了解这种算法的初学者学习和仿真。自矫正控制算法程序,自矫正控制是比较经典的自适应控制方法,适合需要学习了解这种算法的初学者学习和仿真。
    2022-12-19 23:35:03下载
    积分:1
  • Gauss projection operator pros
    应用背景  对勒让德级数进行了改进,提出了以大地线两端点平均纬度及平均方位角为依据的高斯平均引数公式,它具有级数收敛快,公式项数少,精度高,计算较简便,适用范围大等优点。关键技术  首先把勒让德级数在P1点向P2点展开改在大地线长度中点M展开,以使级数公式项数减少,收敛快,精度高;其次到求定中点M的复杂性,将M点用大地线两端点平均纬度及平均方位角相对应的m点来替代,并借助迭代计算,便可顺利地实现大地主题正算。
    2023-02-23 09:55:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载