Can you produce a xy plot and mark coordinates on the plot?

I have a number of vertices for shapes defined by the user, e.g. 4 vertices for a square etc.

Is it possible, without using external libraries, to form a simple xy graph and plot these vertices on the graph to visually show these shapes. I'm relatively new to c++ (uni student not on a computer programming course) so if you can put it in layman's terms that'd be great.

p.s. it needs to compile and run using visual studio 2012

Thanks
Last edited on
If you're not using external libraries it is going to be really hard for no reason.
I would use SDL or SFML.
Just to explain why I can't use external libraries:
I'm a Physics student doing a module on "Object-Oriented Programming in C++" and this is for the final project. Part of the specifications for the project is that it must "Be standard C++ (e.g. do not use external libraries): must compile in Visual studio 2012". Another specification is to use advanced C++ techniques (techniques not covered in the module) and I figured this would be fairly advanced. However, if it's too difficult/impossible then I'll figure something else out.
The C++ programming language does not assume you have any of the following items:

A keyboard
A monitor

If you are not allowed to use anything that is not in the C++ standard library, then you cannot draw anything. The best you could manage is to hope that cout goes to some kind of terminal display, and draw a clunky picture made of lines of characters.

If the real constraint is "it must compile and run using VS 2012", then maybe you can assume that the windows API (which is an external library, but maybe the person setting this task doesn't know that) exists and use that. The windows drawing API is horrible for working with directly and 99% of the world uses an external library rather than use the Win API directly. I would never suggest that a beginner try to work directly with the Win API for drawing.
Last edited on
Should have said that we are using a console window if that changes anything but it sounds like it doesn't.

Unfortunately, it probably needs to be fairly accurate so some form of ASCII image in the console window probably wouldn't cut it when it came to value with decimals (I guess I've been spoilt by other programs like Matlab, etc).

Because I can't use external libraries, I assume the advice is to forget this idea then?
Yup.

You'll note that MatLab gets to make the following assumptions:

You have a keyboard
You have a monitor
Hell, you have a whole operating system!

Fair enough.
Thanks for the help anyway, was worth a shot.
Topic archived. No new replies allowed.