#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDLE);
if(hOut==INVALID_HANDLE_VALUE){
return GetLastError();
}
DWORD dwMode=0;
if(!GetConsoleMode(hOut,&dwMode)){
return GetLastError();
}
dwMode|=0x0004;
if(!SetConsoleMode(hOut,dwMode)){
return GetLastError();
}
//wprintf(L"\x1b[38;2;%d;%d;%dm",r,g,b);
wprintf(L"\x1b[38;2;%d;%d;%dmnonono",255,218,185);
wprintf(L"\x1b[38;2;%d;%d;%dmnonono",25,21,85);
printf("你好你好");
}
中文的话,好像暂时不太支持,所有只能让中文跟于英文后面使其变色