03 2012 档案
摘要:来源:http://www.vimer.cn/2009/12/cc%E5%AE%9E%E7%8E%B0%E5%A4%9A%E5%8F%82%E6%95%B0%E5%87%BD%E6%95%B0%E7%BC%96%E7%A8%8B.html在C/C++中,我们经常会需要实现类似printf这样的函数,即函数的参数个数是不定的,这个时候就需要用到我们这篇文章讲到的方法啦。首先,我们要知道这种函数,如何来定义。比如我想实现一个函数能够支持 fun("%d",1);那么这个函数的定义实际上如下:void fun(const char *fmt, ...);其中...的意思是说参数无
阅读全文
摘要:[C#] 来源:http://www.oschina.net/code/snippet_110991_2237// 编码private string IMAPEncode(string folder){ string rtn = "", base64; int index = 0; Regex regAsis = new Regex(@"\G(?:[\x20-\x25\x27-\x7e])+"); Regex reg26 = new Regex(@"\G&"); Regex regEncode = new Regex(@&qu
阅读全文