![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++11
子达如何
;
展开
-
再次被变量声明撞了一下腰
闲来无事,重读一下《TCPL》,对其中的例子试验了一下:#include #include #include #include #include #include using namespace std;int main(){ string from, to; cin >> from >> to; ifstream is(from.c_str()); istream_iterator ii(is); istream_itera原创 2011-04-20 16:30:00 · 693 阅读 · 0 评论 -
最新DirectXSDK没有dxtrans.h的解决方法
<br />方法一:不要安装最新的SDK,在Aug2007的SDK里面没有这个问题。<br /> <br />方法二:直接在qedit.h中注释掉#include "dxtrans.h"<br />同时将: public IDXEffect注释掉(//: public IDXEffect)<br /> <br />方法三:在你#include <qedit.h>之前添加如下代码:<br /><br />#pragma include_alias( "dxtrans.h", "qedit.h" )<br />原创 2011-05-07 20:58:00 · 1776 阅读 · 0 评论 -
Boost::filesystem 使用小笔记
今天拿起手要用C++写个小工具,从指定的目录递归遍历文件,然后做一下处理。又翻了一下boost的filesystem库。小结一下,希望能加深印象,免得下次又要查看文档。1. path对象就是一个跨平台的路径对象。有许多方法访问路径的各个部分,也用它的iterator迭代路径中的各个部分; path构造目录结构的时候使用“/”运算符,非常直观。 比如path p1;原创 2013-02-18 21:27:38 · 4267 阅读 · 0 评论 -
LUA string.format的小改进
https://github.com/dourgulf/lua_improve让string.format支持”%1$d"这种形式的基于参数位置的格式化字符串。原创 2013-02-20 22:03:54 · 883 阅读 · 0 评论 -
Python 支持位置的格式化符号实现
Python2.7本身已经自带了无类型的位置格式化功能{0}, {1}之类的表示。但是%本身的格式化串则不支持如 %1$s这样的格式化字符串。手写了一个Python的实现,有空再在Python内核实现之:#!/usr/bin/pythonimport redef lformat(fmt, *args): newargs = [] def replacepos原创 2013-03-09 07:29:33 · 916 阅读 · 0 评论