上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 1357 下一页
序中,如果要将ASCII码字符串转换为宽字符(Unicode),可以利用标准C的mbstowcs函数。 微软在MSDN中有示例,如下: 然而,这段代码在处理含有汉字的字符串时就会出现问题。比如将: wchar_t *pwchello = L"Hi"; 替换为wchar_t *pwchello = L Read More
posted @ 2019-01-09 23:06 findumars Views(991) Comments(0) Diggs(0) Edit
今天发现用securecrt登陆时,gcc编译出错时会出现乱码,但直接在主机的窗口界面下用Shell编译却没有乱码。查看了一下当时的错误描述,发现它的引号是中文引号,导致在SecureCRT中显示出错: before numeric constant 在网上查了一下,可以通过修改LC_CTYPE=z Read More
posted @ 2019-01-09 23:01 findumars Views(1921) Comments(0) Diggs(0) Edit
转自:http://zyxhome.org/wp/cc-prog-lang/c-stdlib-setlocale-usage-note/ [在此向原文作者说声谢谢!若有读者看到文章转载时请写该转载地址,不要写我的BLOG地址。尊重他人的劳动成果 ^_^ ] C 和 C++ 的标准库分别有自己的 lo Read More
posted @ 2019-01-09 22:37 findumars Views(1073) Comments(0) Diggs(0) Edit
I have been quite annoyed by a Windows bug that causes a huge number of open-source command-line tools to choke on multi-byte characters at the Window Read More
posted @ 2019-01-09 22:29 findumars Views(438) Comments(0) Diggs(0) Edit
在软件开发中,我们经常需要在内存中存储一些临时数据用于后续相关计算。我们一般把这些数据存储到某个数组里,或者STL中的某个合适的容器中。其实,在Qt中直接为我们提供了一个QCache类专用于这种需求。 QCache类是一个模板类。QCache<key, T> 就定义了一个缓存,其类似于map,也是存 Read More
posted @ 2019-01-09 22:12 findumars Views(1132) Comments(0) Diggs(0) Edit
上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 1357 下一页