最近用到,感谢D大分享,备份博客之~

 

#include <stdio.h>
#include <windows.h>
//多线程共享的数据缓存
char buf[1024]={0};

//显示线程函数
//每隔一段时间来显示缓存中的数据
DWORD WINAPI ThreadFun(LPVOID pM)
{

while (true)
{
puts(buf);
Sleep(100);
}
return 0;
}[……]

更多

前几天发了一个青蛙过河https://www.xushine.net/?p=1110

D大的感叹历历在目啊

现在放个python的版本出来~

trace_stack = []

def recursive(frog_list, final_list):
    global trace_stack

    if frog_list == final_list:
        trace_stack.append(frog_list)
        retur[……]

更多