How can I move a rectangle in C++ with DosBox?

Bharathi November 15, 2011

I am using DosBox for doing C++ programming. I want to move a rectangle in C++. How can I do it?

  1. Anonymous
    November 16, 2011 at 8:50 am
    • Pabharathi2005
      November 16, 2011 at 5:17 am

      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?

      • Jay
        November 16, 2011 at 5:59 am

        are you including graphics.h and other header files?
        can it find libraries without any problem, make sure you have set the paths correctly.

  2. Jeff
    November 15, 2011 at 3:04 pm

    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

  3. Jay
    November 15, 2011 at 1:36 pm

    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.


Ads by Google