摘要: 转自: http://blog.csdn.net/semillon/article/details/6414729①ubuntu下面 直接安装就好了:apt-get install trash-cli②最后,在编辑一下~/.bashrc:gvim~/.bashrc 然后在最后一行添加 alias rm = 'trash' 阅读全文
posted @ 2012-08-09 15:31 Little_Ant 阅读(184) 评论(0) 推荐(0) 编辑
摘要: C++标准的规定:非常量的引用不能指向临时对象:为了防止给常量或临时变量(只有瞬间的生命周期)赋值(易产生bug),只许使用const引用之。下面的内容转自: http://blog.csdn.net/liuxialong/article/details/6539717概括一下:不能把临时对象作为实参传给非const引用。例如:void conv(string &str) { }int main() { conv("dasd"); // 这里错了,编译器自动生成一个string(“dasd”)临时对象,不能将该临时对象传给非const引用}因此,需要将其改为:voi 阅读全文
posted @ 2012-08-01 18:45 Little_Ant 阅读(2356) 评论(0) 推荐(0) 编辑
摘要: 原因:空格,回车等字符编码的问题简单的解决方式:用gedit打开文件, 复制'\xxx'字符,使用sed命令,将‘\xxx’替换成目标字符例如:sed -e 's// /g' -e 's/ / /g' in.cpp > out.cpp注:sed -e 's/src string/dest string/g' 阅读全文
posted @ 2012-07-30 14:38 Little_Ant 阅读(405) 评论(0) 推荐(0) 编辑