摘要:
This is a list of codes used in C++ to change the text color:black - 30red - 31green - 32brown - 33blue - 34magenta - 35cyan - 36lightgray - 37Now these are the basic colours.Usage of "\033[":This is to handle the console cursor. I do not have a complete reference so I ask people who know 阅读全文
摘要:
成功在Ubuntu 10.04下源码编译安装bochs 2.4.5,主要是在配置Bochs的过程中出现了太多错误了。如果出现1、checking for C compiler default output file name… configure: error: C compiler cannot create executables解决方法: apt-get install libc6-dev2、configure: error: C++ preprocessor "/lib/cpp" fails sanity check解决方法:apt-get install buil 阅读全文
摘要:
安装命令如下:1.添加软件源# rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm2.更新yum 缓存# yum makecache3.安装播放器和解码器# yum install ffmpeg ffmpeg-libs gstreamer-ffmpeg xvidcore libdvdr 阅读全文
摘要:
C语言/C++怎样产生随机数:这里要用到的是rand()函数, srand()函数,C语言/C++里没有自带的random(int number)函数。(1) 如果你只要产生随机数而不需要设定范围的话,你只要用rand()就可以了:rand()会返回一随机数值, 范围在0至RAND_MAX 间。RAND_MAX定义在stdlib.h, 其值为2147483647。例如: 1 #include<stdio.h> 2 #include<stdlib.h> 3 4 int main(int argc, char *argv[]) 5 { 6 int i=0; 7 for(i= 阅读全文