自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 这怎么可能(少了一块)

2005-11-30 21:57:00 805

原创 数数有几个黑点

2005-11-30 21:54:00 1248

原创 海盗的难题

海盗的难题(转载) -------------------------------------------------------------------------------- 数学的逻辑有时会导致看来十分怪异的结论。一般的规则是,如果逻辑推理没有漏洞,那么结论就必定站得住脚,即使它与你的直觉矛盾。1998年9月,加利福尼亚州帕洛阿尔托的Stephen M. Omohundro寄给我一道难题,

2005-11-30 21:50:00 766

原创 C++中类型转换(转载)

#include using namespace std;int main( void ){    cout    cout    cout     class Base1    {    };        class Derive1 : public Base1    {    };    Derive1 d1;    Base1& b1 = d1;    cout //  编译时需要加参数

2005-11-30 21:49:00 773

原创 虚拟继承

#include class Base1 {public:  void doIt() { cout};class Base2 {public:  void doIt() {cout};class Derived: public Base1,     // Derived没有声明               public Base2 {    // 一个叫做doIt的函数};class base{p

2005-11-30 21:47:00 778

原创 chmod和find命令的使用

touch myfile 新建一个文件chmod u+w myfile  给属主用户增加执行权限chmod u+x myfilechmod u-r myfilechmod g+x myfile  给同组用户增加执行权限chmod o+x myfile  给其他用户增加执行权限chmod u+s myfile  给文件myfile设置suidid 查看自己属于哪个组ln -s /usr/sgy /u

2005-11-30 21:45:00 1093

原创 如何使gcc编译的程序最小

1、用-O2参数(只是代码优化)  gcc -O2 -o test test.c2、用strip去掉符号信息(调试等信息)   readelf -s test   查看符号信息    strip test  去掉符号信息

2005-11-30 21:44:00 2604 1

原创 虚拟PC和red linux使用技巧

虚拟PC和windows之间切换鼠标:右边的ALT虚拟PC的屏幕最大化:右边的ALT+E恢复虚拟PC屏幕大小:右边的ALT_Lred linux启动时,引导进控制台还是图形界面:编辑etc/inittab文件(vi /etc/inittab)将id:5:initdefault改为id:3:initdefault   5:表示图形界面  3:控制台red linux下网络配置命令:netconfig

2005-11-30 21:42:00 762

原创 void和void* 的用法

#include #include int f(){    return 0;}int main(int argc, char *argv[]){  f(10);    //如果函数为int f(void),则报错   int *pi;  void *pv;  pi=pv;  pv=pi;  //*pv=8;   error // pv[0]=4;  error  int *p =(int*)ma

2005-10-14 17:28:00 3583

原创 一道题看指针和数组的工作原理

#include #include using namespace std; void f(int n[]){ int i = sizeof(n); cout  n++;    //ok cout  cout }int main(){ int m[5]={1,2,3,4,5}; int *p = m; int *q=NULL; char cc=a; char dd=v; cout  cou

2005-10-14 16:10:00 1436

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除