Advertisement
Ciro_meneses

BGI (WinBGIm) + codeblocks

Mar 20th, 2016
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. //Salve como arquivo.cpp
  2. #include <graphics.h>
  3.  
  4. int main( )
  5. {
  6.   int x = 50, y = 40;
  7.  
  8.   //inicia uma janela 800x600 com título
  9.   initwindow( 800, 600, "Exemplo simples" );
  10.  
  11.   //enquanto não for pressionado nenhuma tecla do teclado
  12.   while ( !kbhit() ) {
  13.     //Limpa a tela
  14.     cleardevice();
  15.  
  16.     //desenha uma elipse preenchida nas posições do mouse
  17.     fillellipse( mousex(), mousey(), 50, 50 );
  18.     //para por 0,1 segundos
  19.     delay( 100 );
  20.  
  21.   }
  22.   return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement