64,654
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <stdio.h>
#include <tchar.h>
#include <Windows.h>
#include <string>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
TCHAR tchar[256] = _T("我想在命令提示符窗口下输出特殊字符,比如:☜ ☞ ❤ 等等这些!");
char ch[256];
WideCharToMultiByte(CP_OEMCP, 0, tchar, 256, ch, 256, NULL, false);
printf("%s\n", ch);
string str;
cin>>str;
cout<<str<<endl;
str="比如:☜ ☞ ❤ 等等这些!";
cout<<str<<endl;
return 0;
}