开发者社区 问答 正文

C++程序汉化问题(借鉴Qt)

之前初步学习了Qt的汉化,想知道Qt汉化能不能以及如何应用到非Qt的C++文件上呢,谢谢。

展开
收起
a123456678 2016-03-09 09:41:52 1982 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  •  #include  <iostream>
    #include <fstream>
    #include <string>
    #include <map>
    using namespace std;
    int main()
    {
        wifstream in("1.txt");
        setlocale(LC_ALL, "");
    wchar_ttemp;
    map<wchar_t, int> cnt;
        while(!in.eof())
    {
    in >> temp;
            cnt[temp]++;
    }
    typedef map<wchar_t, int>::const_iterator map_iter;
    for(map_iter it = cnt.begin(); it != cnt.end(); ++it)
        {
            wprintf(L"%lc ", it -> first);
            cout << it -> second << endl;
        }
        return 0;
    }
    2019-07-17 18:55:23 举报
    赞同 评论

    评论

    全部评论 (0)

    登录后可评论
问答分类:
C++
问答标签:
问答地址: