template<typename T, typename U> class Conversion { typedef char Small; class Big{char dummy[2];}; static Small Test(U) { } static Big Test(...) { } &nbs ...
- 16:29
- 浏览 (132)
- 评论 (0)
在某坛子里面逛 看到有些人再批 if( p == NULL ) delete p;p = NULL;很好奇的看了下去 原来 delete 和 free都是支持NULL指针的啊 C99 7.20.3.2 The free function The free function causes the space pointed to by ptr to be deallocated, that is, made available for further allocation. If ptr is a null pointer, no action occurs. C++98 5.3.5 ...
- 10:46
- 浏览 (111)
- 评论 (0)
在csdn上大家寫出了各種方式-@-可是... 都太復雜了 如 1 : void replace(char *pInput, char *pOutput, char *pSrc, char *pDst) { char *pi, *po, *p; int nSrcLen, nDstLen, nLen; pi = pInput; po = pOutput; nSrcLen = strlen(pSrc); nDstLen = strlen(pDst); p = strstr(pi, pSrc); if(p) { while(p) { nLen = (int)(p ...
- 09:39
- 浏览 (123)
- 评论 (0)
其實只需要這樣一段代碼 union UA { int a; char c[4]; }u; u.a = 0x12345678; cout << hex << (unsigned short)u.c[0] <&l ...
- 11:44
- 浏览 (118)
- 评论 (0)
# The readfpl accept a file's path while is fpl(foobar play list), # and return a list which holds all the file'path sub readfpl { my @files; my @chunks; my $index = 0; open(INPUT, "< $_[0]") & ...
- 17:28
- 浏览 (89)
- 评论 (0)
- 浏览: 5513 次
- 性别:

- 来自: 西安

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
今天有谁和我一样在八万人 ...
我在网上直接买了,不用排队
-- by realdah -
今天有谁和我一样在八万人 ...
本来想去的,公司开会,不过看到网上有人23号中午开始排,反而庆幸没去。
-- by maxiaoxia -
传一个数组的引用
奇怪哦 为什么第一个的代码都被弄成一行了啊...
-- by DraculaW






评论排行榜