09 2016 档案

摘要:1. const指针和 指向const的指针指向const的指针: 不允许通过指针来改变其指向的const值const double *cptr*cptr = 42; // error! 指针代表的值无法修改const double pi =3.14double *ptr = &pi //erro... 阅读全文
posted @ 2016-09-27 10:04 洛笔达 阅读(313) 评论(0) 推荐(0) 编辑
摘要:编译程序遇到问题 relocation R_X86_64_32 against `.rodata' can not be used when making a shared object;发现编译的程序引用的一个库(.a文件)是直接用./configure 编译的, 64位机器不能直接./conf... 阅读全文
posted @ 2016-09-23 16:53 洛笔达 阅读(12386) 评论(0) 推荐(0) 编辑
摘要:如果不主动编写拷贝构造函数和赋值函数,编译器将以“位拷贝”的方式自动生成缺省的函数。倘若类中含有指针变量,那么这两个缺省的函数就隐含了错误。以类 String 的两个对象 a,b 为例,假设 a.m_data 的内容为“ hello”,b.m_data 的内容为“ world”。 现将 a 赋给 b... 阅读全文
posted @ 2016-09-18 17:58 洛笔达 阅读(185) 评论(0) 推荐(0) 编辑
摘要:其实冒号后的内容是初始化成员列表,一般有三种情况: 1、对含有对象成员的对象进行初始化,例如, 类line有两个私有对象成员startpoint、endpoint,line的构造函数写成: line(int sx,int sy,int ex,int ey):startpoint(s... 阅读全文
posted @ 2016-09-18 09:31 洛笔达 阅读(920) 评论(0) 推荐(0) 编辑
摘要://把图片加载到SDL_TextureSDL_Texture* loadTexture(const std::string &file, SDL_Renderer *ren){ SDL_Texture *texture = nullptr; SDL_Surface *lo... 阅读全文
posted @ 2016-09-13 10:57 洛笔达 阅读(517) 评论(0) 推荐(0) 编辑
摘要:souid.lib;utilitiesd.lib;pthreadVC2.lib;链接默认输出:(OutDir)(TargetName)$(TargetExt) 阅读全文
posted @ 2016-09-09 15:32 洛笔达 阅读(168) 评论(0) 推荐(0) 编辑
摘要:DATE=(date+{DATE}mv dll/monitor_service.xml ... 阅读全文
posted @ 2016-09-07 17:12 洛笔达 阅读(516) 评论(0) 推荐(0) 编辑
摘要:我们用gcc编译程序时,可能会用到“-I”(大写i),“-L”(大写l),“-l”(小写l)等参数,下面做个记录:例:gcc -o hello hello.c -I /home/hello/include -L /home/hello/lib -lworld上面这句表示在编译hello.c时:-I ... 阅读全文
posted @ 2016-09-07 11:52 洛笔达 阅读(3669) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示