0
点赞
收藏
分享

微信扫一扫

C++文章生成器

cnlinkchina 2022-03-16 阅读 64
c++

废话不多说,直接上源码

#include<iostream>
#include<cstring>
#include<cwchar>
#include<locale>
#include<cstdlib>
#include<windows.h>
#pragma warning(disable:4996)
using namespace std;
double seed = 997;
wchar_t list[1200000];
class Nextword {
public:
    Nextword(wchar_t _pre,wchar_t _last,int _number):pre(_pre),last(_last),ArticleNumber(_number) {};
    wchar_t next();
private:
    wchar_t nextword, pre, last;
    int ArticleNumber;
};
wchar_t Nextword::next()
{
    wchar_t list2[120000];
    int j = 0, n, m;
    for (int i = 2; i < ArticleNumber - 2; i++) {
        if (pre == list[i] && last == list[i + 1]) {
            list2[j] = list[i + 2];
            j++;
        }
    }
   

举报

相关推荐

0 条评论