![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Draw a line in C++ graphics
In this tutorial, we will be discussing a program to draw a line in C++ graphics.
To implement different shapes and sizes, animations, graphics.h library is used in C++.
Example
#include <graphics.h> int main(){ int gd = DETECT, gm; initgraph(&gd, &gm, ""); line(150, 150, 450, 150); line(150, 200, 450, 200); line(150, 250, 450, 250); getch(); closegraph(); return 0; }
Output
Advertisements