2014年3月27日

gcc、g++

摘要: http://hi.baidu.com/zhangcunli8499/item/257e187360b48b2bd6a89cc6g++ src/*.cpp -I include/ -I include/seg/ -L lib/ -ljsoncpp -lpthread -liflyws -liFlyWS_Engine -o testgcc/g++ 参数: gcc/g++在执行编译工作的时候,总共需要 4 步 gcc and g++分别是gnu的c & c++编译器gcc/g++在执行编译工作的时候,总共需要4步1.预处理,生成.i的文件[预处理器cpp]2.将预处理后的文件不转换成汇编语 阅读全文

posted @ 2014-03-27 17:28 雪 狼 阅读(228) 评论(0) 推荐(0)

2014年3月26日

找不到所需要的ndbm.h头文件

摘要: 具体描述: 通过deb包安装gdbm之后,发现找不到所需要的ndbm.h头文件。但是你会发现一个叫gdbm-ndbm.h的文件,你只需要把文件名改成ndbm.h就可以了,当然需要一定权限。sudo cp '/usr/include/gdbm-ndbm.h' '/usr/include/ndbm.h'错误提示:configure: WARNING: configure has detected that you do not have anappropriate ndbm header file installed on yoursystem.Compilatio 阅读全文

posted @ 2014-03-26 17:29 雪 狼 阅读(374) 评论(0) 推荐(0)

2014年3月22日

最长公共字串(LCS)最长连续公共字串(LCCS)

摘要: 链接1:http://blog.csdn.net/x_xiaoge/article/details/7376220链接2:http://blog.csdn.net/x_xiaoge/article/details/7376217链接3:http://www.cnblogs.com/huangxincheng/archive/2012/11/11/2764625.htmlLCS1、动态规划法:见链接1、3int LCS( string leftString, string rightString ){ int lenLeft = leftString.length(); int lenRight 阅读全文

posted @ 2014-03-22 17:00 雪 狼 阅读(428) 评论(0) 推荐(0)

2014年3月19日

C# 爬虫批量下载文件

摘要: public static void DownFile(string url, string path, string fileName) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.2) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13... 阅读全文

posted @ 2014-03-19 21:06 雪 狼 阅读(2199) 评论(0) 推荐(0)

2014年3月15日

'"VCVARS32.BAT"' 不是内部或外部命令,也不是可运行的程序

摘要: 更换 阅读全文

posted @ 2014-03-15 14:19 雪 狼 阅读(1869) 评论(0) 推荐(0)

2014年3月12日

jsoncpp 生成 json 字符串

摘要: Json::Value root; Json::Value arrayObj; Json::Value item; for (int i=0; i<10; i++) { item["key"] = i; item["value"] = 10*i; arrayObj.append(item); } root["key1"] = "value1"; root["key2"] = "value2"; root["array"] = arrayObj; ro 阅读全文

posted @ 2014-03-12 20:15 雪 狼 阅读(1414) 评论(0) 推荐(0)

replace() replace_copy()

摘要: int a[] = {1,2,3,3,4}; vector v(a, a+5); vector v2;//replace(v.begin(), v.end(), 3, 9); //把 v 中的3 替换为 9 replace_copy(v.begin(), v.end(), back_inserter(v2), 3, 9); //把 v 中的3 替换为 9 赋值给v2 ,v的值不变 for (int i =0; i iVec( ia, ia+7 ); cout ::iterator it = iVec.begin(); it != iVec.end(); ++it ) { cout iL... 阅读全文

posted @ 2014-03-12 10:10 雪 狼 阅读(446) 评论(0) 推荐(0)

2014年3月11日

C++ 拆分字符串-copy()

摘要: c++拆分字符串方法:#include #include #include #include #include int main() {using namespace std;string sentence = "Something in the way she moves...";istringstream iss(sentence);copy(istream_iterator(iss),istream_iterator(),ostream_iterator(cout, "\n"));}你也可以将分割后的字符串复制到vector内:vector tok 阅读全文

posted @ 2014-03-11 18:21 雪 狼 阅读(658) 评论(0) 推荐(0)

2014年3月7日

ubuntu- eclipse、CDT安装

摘要: eclipse的安装: 应用程序->附件->终端 然后输入(中间可能需要你输入密码): sudo apt-get install eclipse sudo apt-get install eclipse-pde sudo apt-get install eclipse-jdtCDT安装: 打开Eclipse(终端输入eclipse即可),打开Help->Install New Software,然后点击Add按钮,在弹出的对话框中Name项填入CDT,Location项填入http://download.eclipse.org/tools/cdt/releases/indig 阅读全文

posted @ 2014-03-07 13:28 雪 狼 阅读(436) 评论(0) 推荐(0)

2014年3月4日

VS 2010 编译安装 boost 库 -(和 jsoncpp 库共存)

摘要: boost库的简单应用很容易,网上有很多资料,但是,如果要json 和 boost 一起使用就会出现这样那样的问题, 有时候提示找不到 “libboost_coroutine-vc100-mt-sgd-1_55.lib”,对此,可以按照如下方式进行安装:1、下载,不多说;2、解压,不多说: 加入解压在D:\SoftWare\boost_1_55_03、打开windows命令行,转到“boost_1_47_0”目录下。运行:bootstrap.bat,生成b2.exe和bjam.exe两个Build文件。4、执行:bjam toolset=msvc-10.0 variant=debug,rel. 阅读全文

posted @ 2014-03-04 09:20 雪 狼 阅读(361) 评论(0) 推荐(0)

导航