Dzień dobry, przy stosowaniu komendy clear (macOS, Xcode), dokleja się do niej: TERM environment variable not set, wygląda to tak:
15
TERM environment variable not set.
14
TERM environment variable not set.
13
TERM environment variable not set.
(...)
Zaś cały kod wygląda następująco:
#include <iostream>
#include <unistd.h>
#include <cstdlib>
int main(int argc, const char * argv[]) {
for (int i=15; i>=0; i--)
{
sleep (1);
std::cout<<i<<std::endl;
system ("clear");
}
std::cout<<"jebut"<<std::endl;
return 0;
}