摘要:
#include #include using namespace std;//使用宽字符,我猜是为了适应那些要使用宽字符的国家int main(){ auto path = Plug::GetCurrentPath();//返回std::wstring宽字符 std::wstring ... 阅读全文
posted @ 2014-05-23 23:30
zzyoucan
阅读(2278)
评论(0)
推荐(0)
摘要:
·C语言相关 对应于char, C语言中也有宽字符内型wchar_t。wchar_t被定义为:typedef unsigned shortwchar_t;显然它是16位的。wchar_t类型的常字串应该这样写:L"hello"。因此可以这样定义一个宽字符指针wchar_t *pwc=L"hello... 阅读全文
posted @ 2014-05-23 23:07
zzyoucan
阅读(1549)
评论(0)
推荐(0)
摘要:
NULL、0、nullptrC的NULL在C语言中,我们使用NULL表示空指针,也就是我们可以写如下代码: int *i = NULL;foo_t *f = NULL; 实际上在C语言中,NULL通常被定义为如下: #define NULL ((void *)0) 也就是说NULL实际上是一个voi... 阅读全文
posted @ 2014-05-23 22:24
zzyoucan
阅读(418)
评论(0)
推荐(0)

浙公网安备 33010602011771号