Войти

Показать полную графическую версию : Точки


luciy93
08-04-2012, 02:55
Здравствуйте! Как можно сделать так, как в этой программе, когда выбираешь первый пункт меню, а затем нажимаешь function one, чтобы так двигались точки? Файл прикреплен. Заранее спасибо!

ferget
08-04-2012, 03:47
вот так например


#include <iostream>
#include <Windows.h>
#include <stdlib.h>

#define pot "."

using namespace std;

int main()
{
int n=5;
int i=0;

HANDLE handle;
handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO structCursorInfo;
GetConsoleCursorInfo(handle,&structCursorInfo);
structCursorInfo.bVisible = FALSE;
SetConsoleCursorInfo( handle, &structCursorInfo );

while(true)
{
cout<<"go";
Sleep(1000);
while(i<=n)
{
cout << pot;
Sleep(1000);
i++;
}
i=0;
system("cls");
}

return 0;
}

luciy93
08-04-2012, 13:57
ferget, спасибо Вам! Выручили)




© OSzone.net 2001-2012