摘要: 想学shell的同学请记住: 如果你写好脚本后不给脚本执行权限那也是不行的: 添加执行权限: chmod +x 脚本名.sh 在Linux shell中有一个脚本编译命令: bash -v 脚本名.sh bash -x 脚本名.sh example: bash -v test.sh bash -x 阅读全文
posted @ 2013-11-06 10:02 退之 阅读(2367) 评论(0) 推荐(0) 编辑
摘要: #ifdef __cplusplus #include #else #include #endif#include #include const int SCREEN_WIDTH=640;const int SCREEN_HEIGT=480;const int SCREEN_BPP=32;SDL_Surface *message=NULL;SDL_Surface *background=NULL;SDL_Surface *screen=NULL;SDL_Surface *load_image(std::string filename){ SDL_Surface* loaded... 阅读全文
posted @ 2013-11-06 09:31 退之 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 1 #ifdef __cplusplus 2 #include 3 #else 4 #include 5 #endif 6 7 #include 8 9 int main( int argc, char* args[] )10 {11 SDL_Surface* hello=NULL;12 SDL_Surface* screen=NULL;13 14 SDL_Init(SDL_INIT_EVERYTHING);15 16 screen= SDL_SetVideoMode(640,480,32,SDL_SWSURFACE);17 18 ... 阅读全文
posted @ 2013-11-06 09:26 退之 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 class Base0 5 { 6 public: 7 int var0; 8 void fun0() 9 {10 cout<<"Member of Base0"<<endl;11 }12 };13 14 class Base1:virtual public Base015 {16 public:17 int var1;18 };19 20 class Base2:virtual public Base021 {22 public:23 int var... 阅读全文
posted @ 2013-11-06 09:19 退之 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 1 //多继承同名隐藏 2 #include 3 4 using namespace std; 5 6 class Base1 7 { 8 public: 9 int var;10 void fun()11 {12 coutBase2::var=3;50 p->Base2::fun();51 }52 return 0;53 } 阅读全文
posted @ 2013-11-06 09:15 退之 阅读(510) 评论(0) 推荐(0) 编辑