Dev-Cpp
Dev-Cpp copied to clipboard
does not read ASCII art. please fix if you can...
trafficstars

It can't read ASCII art like other compilers do. It doesn't even show up on the code. Please fix, thank you...
Do you have a file or link to a file that has an example ?
(C++ language)
You should first save your file as UTF-8, then include <fcntl.h> and <io.h>. before couting your ASCII art you should do "_setmode(_fileno(stdout), _O_U16TEXT);" and after you output your ascii art using "wcout << L"INSERT ART HERE";" , do "_setmode(_fileno(stdout), _O_TEXT);"
EXAMPLE :
#include <iostream>
#include <fcntl.h>
#include <io.h>
using namespace std;
int main (){
cout << "Hello" << endl;
_setmode(_fileno(stdout), _O_U16TEXT);
wcout << L"██████╗░" << endl;
wcout << L"╚════██╗" << endl;
wcout << L"░█████╔╝" << endl;
wcout << L"░╚═══██╗" << endl;
wcout << L"██████╔╝" << endl;
wcout << L"╚═════╝░" << endl;
_setmode(_fileno(stdout), _O_TEXT);
cout << "Hello again";
}
Worked for me.