snippet needed

i need a snippet for drawing a box and a circle of desired dimensions in c++ without the use of graphics.h

thanks in advance

Drawing them in the console using ascii? Or actually drawing graphics?
actually drawing graphics
You're going to want to get a 3rd party library. I would recommend SDL.

This guy has a great set of video tutorials:
And I think most people on here would agree lazy foo is the go to guy for SDL text tutorials:

There are other options out there though, so to be fair, I'll post some others: - SFML - Will do the job and it is very much geared towards game programming. - Good graphics library, although quite complex.
thanks @Mats

but can please suggest some snippet i asked for in c++?
No. That's not how you learn. =/

Everything you need is there.
Last edited on
sorry i also dont like looking out for prewritten code, but i'm havin my preboard day after tommorow and i need this snipet for my project.
otherwise i would have learnt it from my teacher or many of the forums on net
Typical video tutorial is 10-30 mins. You can learn what you need tonight if you put in a stupendous effort. Go for it!
thanx for it.
i may see it tommorow coz i've go to sleep,
here time is 00:10 :)
If you're using C++, I would prefer SFML over SDL.

It is clean, OO C++ with good official documentation and a helpful community. You also don't have to download extra libraries for loading more than a bmp, text, audio, and networking.

I have used both, and I definitely prefer SFML. When I used SFML, I had to write a fair amount of wrapper code to ensure RAII, but since SFML is C++ it will handle it own resources.

I also recommend Thor, an extension to SFML, which provides useful things such as animation and particles.
Topic archived. No new replies allowed.