printing ansi art in windows cmd?

Hello, do any one know how to print out ansi art in cmd with the help of c++?

I have learned that cleaning screen is


system ("CLS");

If you copy the code below and save it as .txt on your computer and then
open cmd and type

type drop the file you should see ansi art that looks like this:
https://imgur.com/85TW7k9

so the line should look like
[dir path]\ type [filename.txt]


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26



               ÛÛÛÛÛÛÛÛÛÛÛÛ
             ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
           ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
          ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
          ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
          ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
          ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
           ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
           ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
            ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
             ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
              ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ             ÛÛÛÛÛÛÛÛÛÛÛÛ
               ÛÛÛÛÛÛÛÛÛÛÛÛ              ÛÛÛÛÛÛÛÛÛÛÛÛ
                 ÛÛÛÛÛÛÛÛÛ               ÛÛÛÛÛÛÛÛÛÛÛÛ
                                         ÛÛÛÛÛÛÛÛÛÛÛÛ
                                         ÛÛÛÛÛÛÛÛÛÛÛÛ
                                         ÛÛÛÛÛÛÛÛÛÛÛÛ





SAUCE00Le Art                             Blackshore          Pixeldust           20200723Ì  P >      IBM VGA            
Last edited on
Hello blackshore ,

I tried this:
1
2
3
4
5
6
7
8
#include <iostream>

int main()
{
     system("type art.txt");

    return 0;  // <--- Not required, but makes a good break point.
}

And it worked. But I had to put the file in the current working directory that the program uses.

I tried adding a path, but that made my headache worse. You may have to add code to change the directory before the system call.

This worked, but I do not advise or promote using "system" calls because they are not hack proof and could leave the computer open to hackers.

Andy
https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences

this may help

what you have is likely the binary form of these ideas, so you should be able to convert the file you have into the commands you need with a little poking at it.
Last edited on
Topic archived. No new replies allowed.