nio wlasnie:
#include <windows.h>
#include <dos.h>
#include <stdio.h>
#include <iostream.h>
void GotoXY(short x,short y)
{
HANDLE hConsoleOutput;
COORD Cursor_an_Pos = { x,y};
hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hConsoleOutput , Cursor_an_Pos);
}
void WypelnijProstokat(int x, int y, int szer, int wys, char znak)
{
GotoXY(x,y);
for (int pszer=x; pszer<=szer; pszer++)
{
for (int pwys=y; pwys<=wys; pwys++)
{
GotoXY(pszer,pwys);
cout << znak;
}
}
GotoXY(0,0);
}
void main()
{
WypelnijProstokat(10, 20, 10, 10, "A");
for(;;) {
WypelnijProstokat(20, 20, 20, 3, " ");
}
}
VC++