<curses.h>
#include <curses.h>
int main()
{
char users_name[100];
// Remember, when using Curses, no change will appear
// on the screen until refresh() is called
initscr();
addstr(" What is your name: ");
refresh();
getnstr(users_name, sizeof(users_name) - 1);
clear(); // system("cls");
printw(" Greetings and salutations %s!\n", users_name);
refresh();
printw("\n Press ENTER to quit.");
refresh();
getnstr(users_name, sizeof(users_name) - 1);
endwin();
return 0;
}
lub może nie do końca w temacie, ale przeanalizuj ten kod (dawno temu była potrzeba napisania, TAKIEGO zegara)
zegar.cmd
@echo off
:loop
timeout /T 0 /NOBREAK > NUL
cls
set h=%time:~0,2%
set m=%time:~2,2%
set s=%time:~4,4%
echo %h%%m%%s%
timeout /T 1 > NUL
rem choice /T:1 /D:"y" /N > NUL
goto loop
[ timeout in a batch file ]