[Solved] How to i execute a cpp file within a cpp file?


There is no need to make a new program to print this on the screen…

And that’s for a simple reason, it will actually print it on a different window and that’s not what you want, right?

Another misunderstanding you have is that you don’t execute .cpp
files. .cpp files contain source code that you have to compile in order to execute them. And again this is not how stuff works in C++.

So, to the solution.

On your programs code make a new function, let’s say PrintDeathScreen. You have two options. Read the ASCII from the file as you would do (but I don’t really recomend that) or hard-code it into a variable and then just print it on the screen. This will save you from the trouble to open and read the file.

0

solved How to i execute a cpp file within a cpp file?