how can we make a background in c++ ..

Recommended Answers

All 3 Replies

Member Avatar for Sanchit_Sahu

Try using this... hope it should work..

main()
{
    textbackgroundcolor(BLUE);
    textcolor(YELLOW);

    clrscr();
    cout<<"/n/n/t/t/t HENRY";
    getch();
    return 0;
}

NO.

This code relies on the old Turbo C++ compiler, and isn't even remotely viable with any modern C++ compiler.

The real answer is, it depends on the operating system you are writing for and the graphics libraries you are using. C++ doesn't not have any standard graphics support, or even console support for that matter; only the very bare-bones stream I/O is part of the standard library. Everything involving things like background is dependent on the graphics software you are using.

you can try to read this. Good luck.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.