页首Html代码

返回顶部
摘要: leveldb自带的Makefile中居然没有install那我自己写一个脚本得了:#!/bin/bashcheckRoot(){if [ ! $(id -u) = 0 ];then echo "need be root!,your id -u is :$(id -u)" exit;fi}PREFIX=/usrINCLUDE=$PREFIX/includeLIB=$PREFIX/libhelp(){ echo "$0 install|uninstall"}check(){ #verify ls $INCLUDE/leveldb ls -l $LIB/li 阅读全文
posted @ 2012-03-16 18:43 ayanmw 阅读(3165) 评论(1) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;#include <stdio.h>struct _test{ int a; _test() :a(1){ this->a=2; }};int main() {struct _test test;printf("struct test.a=%d\n",test.a);return 0;}可能这不是特殊用法,我也是刚开始深入C++,上面的struct _test 在构造函数中给a赋值,有两种操作,一种是构造函数后的" :a(1)",意思是a=1;a猛 阅读全文
posted @ 2012-03-16 16:57 ayanmw 阅读(2063) 评论(0) 推荐(0) 编辑
摘要: $ g++ -lleveldb -lpthread -I/usr/include/libxml2 leveldbtest.cpp$ g++ leveldbtest.cpp -lleveldb -lpthread -I/usr/include/libxml2这两段代码有什么区别呢?也就是cpp在前在后的问题。然后事实是:$ g++ -lleveldb -lpthread -I/usr/include/libxml2 leveldbtest.cpp/tmp/cctYSqtg.o: In function `main':leveldbtest.cpp:(.text+0x1a): undefi 阅读全文
posted @ 2012-03-16 15:14 ayanmw 阅读(2737) 评论(1) 推荐(0) 编辑
摘要: svn help 中有 propset propget propdel proplist propedit五个关于prop,也就是svn属性的设置。在当前的svn工作拷贝下,svn status有些文件总是提示? 很烦人,所以希望通过设置svn:ignore来避免这种无聊的提示,试了几下命令,不行,还是看看 svn help propedit吧,终于弄懂了。一下是svn的这个帮助信息:View Code propset (pset, ps): Set the value of a property on files, dirs, or revisions.usage: 1. propset P 阅读全文
posted @ 2012-03-16 11:50 ayanmw 阅读(40356) 评论(2) 推荐(1) 编辑

页脚Html代码