You are here:

C++/graphics using porland c++

Advertisement


Question
how can i use the borland to draw multi equations
ex:
a1x1+b1x2=c1
a2x1+b2x2=c2
and the objective function is
z=a3x1+b3x2
thx in advance

Answer
Hello yosreman, thank you for the question.

Drawing these equations shouldn't be any problem with some handy Windows GDI functions. First, get the handle to your window from the function call to CreateWindow(or if this is a console application you can call GetConsoleWindow()). Then from the handle to your window you can get a device context by calling GetDC(). Then you can start drawing equations by making calls to the function SetPixel(). SetPixel takes in a handle to a device context, a x coordinate, a y coordinate, and a color and sets the appropriate pixel to that color. See? It's not so bad.

I hope this information was helpful.

- Eddie  

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Eddie

Expertise

I can answer questions about the C++ language, object oriented design and architecture. I am knowledgable in a lot of the math that goes into programming, and am certified by ExpertRating.com. I also know a good deal about graphics via OpenGL, and GUIs.

Experience

I have completed numerous games and demos created with the C++ programming language. Currently employed as a software engineer in the modeling and simulation field. I have about 7 years experience.

©2016 About.com. All rights reserved.