上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页
摘要: ---恢复内容开始---Example 1Creating and terminating thread by usingpthread_create, pthread_exit(status)#include #include #include using namespace std;#defin... 阅读全文
posted @ 2014-05-05 20:44 周卓 阅读(709) 评论(0) 推荐(0) 编辑
摘要: 一 设置, 查看, 删除断点信息b xxx.cpp : num(or function)在 xxx.cpp 的第 num 行设置断点, 假如项目中只有一个 .cpp 文件, 不需要指定 xxx.cpp, 直接 b num 即可info break 查看断点信息, 断点信息中有断点的 index, 通... 阅读全文
posted @ 2014-05-01 10:35 周卓 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1. 指针使用2. 在循环体内使用 return 的坏处3. quick and dirty, performance and design strategy 阅读全文
posted @ 2014-04-30 08:43 周卓 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 平时做算法题目, 没少用到 GDB, 但今天才意识到 Project 的调试方法与单个 cpp 文件的不同之处, 比如 gdb list 命令, 在单个 cpp 文件中列出的是源代码, 但在 project 中却什么都不显示Project Debug 时, file 参数的使用[1] 有讲解, UP... 阅读全文
posted @ 2014-04-29 14:17 周卓 阅读(787) 评论(0) 推荐(0) 编辑
摘要: 1. 使用 makefile 的原因假如每次都手动输入, 可能会写出这样的编译命令gcc -c main.cgcc -c mytool1.cgcc -c mytool2.cgcc -o main main.o mytool1.o mytool2.o那么, 可不可以将这个命令写成 shell 脚本呢,... 阅读全文
posted @ 2014-04-29 10:10 周卓 阅读(215) 评论(0) 推荐(0) 编辑
摘要: [1] 给出在 ubuntu 下配置 boost + eclipse 步骤, 写的比较具体, 但是配置完后并不能正确运行, 主要是出了两个错误[4] for general purpose, worked for me.出现的错误1. 找不到 libboost_regex or cannot fin... 阅读全文
posted @ 2014-04-28 16:23 周卓 阅读(466) 评论(0) 推荐(0) 编辑
摘要: 1. 头文件重复引用强行将涉及文件操作都放在 my_file_system.h/.cpp 中, 导致出现了需要头文件相互引用的局面, 具体来说有两个头文件和源文件, 分别是 h1.h, h1.cpp, h2.h, h2.cpp. 在 h2.h 中 include "h1.h" 并定义了 class ... 阅读全文
posted @ 2014-04-26 06:46 周卓 阅读(433) 评论(0) 推荐(0) 编辑
摘要: 思路1. 典型的深搜题2. 框架 dfs(board, ith)代码#include #include #include #include #include #include #include #include #include #include #define MIN(x,y) (x)(y)?(x... 阅读全文
posted @ 2014-04-25 11:36 周卓 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 遇到一些题目, 用递归加 bottom-up 解法能得到更优的时间复杂度, 对这些题目做一个汇总1. google code jam Rational Number Tree 2. 二叉树的公共祖先节点3. leetcode convert sorted list to balanced searc... 阅读全文
posted @ 2014-04-24 20:20 周卓 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 1. 定制 pcap_dumppcap_dump 用于将数据包写入磁盘, 配合 pcap_open_dead 可以将写入文件转化为 wireshark 可读格式但这个函数缺少一个参数, 应提供 append 和 write 选项经过彻底的搜索, 发现靠 winpcap 的 API 是无法满足我的需求... 阅读全文
posted @ 2014-04-24 19:55 周卓 阅读(265) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页