I am using DosBox for doing C++ programming. I want to move a rectangle in C++. How can I do it?
Have you read this
C++ program to draw and move a circle on the screen
Turbo C Graphics - Move Object using getimage and putimage
Borland Graphics Interface (BGI) for Windows
Graphics in C Language
Computer Graphics Programs
Thanks for the suggestions. I think I did not frame my question correctly. The main problem I am facing is that my Turbo C++ version through DosBox is not supporting graphics. My OS is Windows 7 64-bit. Can anyone help?
are you including graphics.h and other header files?
can it find libraries without any problem, make sure you have set the paths correctly.
Can you use an API? SDL and OpenGL are definitely going to make your life easier here. The D3D library has also proved to be invaluable and easy to learn.
Part One: The Basics of Rotations in Three Dimensions
An Object Oriented Approach to Animation
so you are learning graphics in c ! BCA ?
use rectangle function or line , and change the co-ordinates using for loop, i don't remember the exact coding, but I used to create some cool animations in lab.
make changes in this coding and try:
using rectangle in for loop, and clearviewport should do it.
as it will create rectagle on new location and clear the previous.