kapplication.h
来自「这是一个魔头罗拉e680的qt手机游戏的源代码」· C头文件 代码 · 共 24 行
H
24 行
#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <time.h>static int _random() { static int init = false; if (!init) { unsigned int seed; init = true; int fd = ::open("/dev/urandom", O_RDONLY); if( fd<=0 || ::read(fd, &seed, sizeof(seed)) != sizeof(seed) ) { srand(getpid()); seed = rand()+time(0); } if(fd>=0) close( fd ); srand(seed); } return rand();}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?