Code snippet permanently changed the colour of the console text even after scrapping the code

Hi, I used a code snippet for manipulating TextAttributes from an article on this site. The code is here:

http://www.cplusplus.com/articles/Eyhv0pDG/

I won't even mention what my struggle was to get that code to work (linker errors all over the place if you use that code in more than 1 file).

The problem is, even after completely deleting the code and running my program the console still displays all the text in Aqua (the last colour I used in one of the test runs).

How do I restore original settings? Shouldn't the console automatically switch to original attributes after closing the program?

Thanks :)
How do I restore original settings?

Either under Console properties->Colors or Console defaults->Colors
Is there a way to make that code usable in multiple files? As I said, the code works only if it is included in one file.
That is not a well-written article.

You have to remember and restore the original settings.
http://www.cplusplus.com/forum/general/48596/#msg264748

If you are planning on playing with the console, I would actually advise you to take a look at the PDCurses library.
https://pdcurses.sourceforge.io/

Documentation
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

Here are a couple of examples using it:
http://www.cplusplus.com/forum/general/497/#msg1734
http://www.cplusplus.com/forum/general/11032/#msg52049

Hope this helps.
Topic archived. No new replies allowed.