Chinaunix首页 | 论坛 | 博客
  • 博客访问: 23951
  • 博文数量: 19
  • 博客积分: 1445
  • 博客等级: 上尉
  • 技术积分: 200
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-30 10:52
文章分类

全部博文(19)

文章存档

2011年(1)

2009年(18)

我的朋友
最近访客

分类: C/C++

2009-11-06 15:09:40

//linux使用unicode写文件
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include <locale.h>
int main(int argc,wchar_t *argv[])
{
    
    setlocale(LC_ALL,"");
    wprintf(L"%s\n",argv[1]);
  
    return 0;
}
//必须设置语言环境


阅读(698) | 评论(0) | 转发(0) |
0

上一篇:字母和汉字取长度

下一篇:自己实现strncpy

给主人留下些什么吧!~~