Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how do I create a triange using c++?

+1 vote
asked Sep 28, 2022 by Michael Lillie II (130 points)
I want to learn to draw a basic shape using c++

How do I let the program know that want it to draw a shape?

1 Answer

+2 votes
answered Oct 2, 2022 by Peter Minarik (82,920 points)

In OnlineGDB you only have the standard input and output (the console) and hence you cannot have graphics.

You should use a graphics API, such as OpenGL, DirectX or Vulkan.

You can also use a home brew rendering framework that does not render triangles on the graphics screen, but on the character screen (console). I've got one lying around in Java, I'll turn it into a C++ project and share the project with you if you'd like to play around.

Good luck!

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.