Learn to Code via Tutorials on Repl.it!

← Back to all posts
How to change font and background color for C++
WoahJamalChill (4)

in this post i will show you how to change the font or background color in c++, there is a lot of questions around the internet asking how to change it, and I have a solution. This is a very simple solution and you can pick how to change it however you want, but the colors are limited

Comments
hotnewtop
Bookie0 (6358)

this post i will show you how to change the font or background color in c++

you said background color, there's only colors of the text here..

Also there are more colors here ;)

KarterBeaver (0)

@Bookie0 if you look at the code.. you can use those colors for background to

Bookie0 (6358)

@KarterBeaver oh so background color of the text I thought you meant the background of the console lol

KarterBeaver (0)

@Bookie0 yea... sorry should have made it more clear... im trying to figure out background console color

Bookie0 (6358)

cool!

for the background console color, I guess you could spam the character of the space () with a background color lol :) @KarterBeaver

KarterBeaver (0)

@Bookie0 oh btw im the one who posted ut... the @beavekar000 is my alt...

KarterBeaver (0)

@Bookie0 question... how good is you knowledge with c++?

Bookie0 (6358)

@KarterBeaver its ok, I've made a basics tutorial with someone

KarterBeaver (0)

@Bookie0 would you happen to kbow why -1 to leave on one of my games i made wont work? I have it set if(color= -1)
{
Goto play;
}
So this is for the shop... i made a shop to buy things but i have it set for 7 to leve bc there is 6 things currently you can buy... 1-6 so i just made 7 leave... but when i tried switching it to -1 to leave it says not enough coins try again... but i have no idea why its saying that... i already made a post about it but no one answered

Bookie0 (6358)

@KarterBeaver uh can you specify your question a bit..?

KarterBeaver (0)

@Bookie0 yea, let me send the code