My photo
Bangalore, Karnataka, India
Extending one hand to help someone has more value rather than joining two hands for prayer

Archives

program to print a barcode

Tuesday, September 1, 2009

#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
int d,m,e;
d=DETECT;
initgraph(&d,&m,"c:/tc");
e=graphresult();
if(e!=0)
{  cout<<" graphics r not opened";
   getch();
   return;
}
setbkcolor(4);
for(int i=0;i<128;i++)
{ setcolor(i);
  line((i*3+50),50,(i*3+50),80);
}
getch();
}

0 comments: