摘要: 题目描述总结1. '_' 运算符不是 a*10 + b, 而是 a*(10 or 100) + b2. char * 与 string 的相互转化char* = string.c_str()string = char*3. 中缀表达式转后者表达式 参考:http://www.cnblogs.com/xinsheng/p/3591781.html4. 通用的中缀转后缀, 用 string 存数据比较好代码 未通过九度测试#include #include #include #include #include #include #include #include #include 阅读全文
posted @ 2014-04-03 11:19 周卓 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 题目描述总结1. 将数字转化成 string 和字符串sprintf(char*, "%d", int)string = char*, 可以直接赋值2. std::sort 的比较函数写法bool cmp(const &int, const &int)3. 能用库函数, 尽量用库函数, 能减少错误代码未通过九度测试#include #include #include #include #include #include using namespace std;int n;int arr[1000];bool cmp(const int &a, con 阅读全文
posted @ 2014-04-03 09:26 周卓 阅读(172) 评论(0) 推荐(0) 编辑