首页
社区
课程
招聘
未解决 西佳佳的代码,有2个疑问
发表于: 2020-8-2 07:05 1866

未解决 西佳佳的代码,有2个疑问

2020-8-2 07:05
1866
(1)这个是c99的西佳佳标准吗?结构体里面定义了函数,我在89的标准里没有看到过。
     如果是c99的标准,具体是怎么使用的?



(2)下面的函数在做什么啊?

        bool RealSplit()
        {
                return splitPeriodically || splitCount > 0;
        }


==================================

struct Options
{
        int delay;                               // 延迟, 即播放速度
        int numbers;                             // 最后的多少手棋显示手数
        bool splitPeriodically;                  // 是否分割
        int splitCount;                          // 分割点的个数
        int splitPoints[20];                     // 分割点
        int cw;                                  // cell width, 棋子尺寸

        // 是否真的要分割图片
        bool RealSplit()
        {
                return splitPeriodically || splitCount > 0;
        }

        // 延迟转为字符串
        string GetDelayString()
        {
                char buf[32];
                sprintf(buf, "%d", delay);
                return buf;
        }

        void SetDelayString(const string & s)
        {
                delay = 50;
                delay = atoi(s.c_str());
                if(delay <0)
                {
                        delay = 0;
                }
        }
      ......

} g_options;


[课程]Linux pwn 探索篇!

收藏
免费 0
支持
分享
最新回复 (3)
雪    币: 23
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
2
函数返回是否分割图片,如果代表分割图片的变量splitPeriodically为true则分割,或者当分割的点数splitCount>0的时候分割
2020-8-5 15:40
0
雪    币: 43
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
3

none

最后于 2020-9-19 01:33 被pythagoras编辑 ,原因: none
2020-8-6 21:58
0
雪    币: 60
活跃值: (670)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
4
"西佳佳"  现在都这么叫了嘛
2020-8-6 23:09
0
游客
登录 | 注册 方可回帖
返回
//