add system detector

This commit is contained in:
Valk Richard Li 2020-01-07 00:08:26 +08:00 committed by GitHub
parent d24e7088e3
commit 1dc355a722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 3 deletions

View File

@ -30,10 +30,18 @@ int main()
}
else if(command=="cls")
{
#ifdef _WIN32
#pragma message("windows system detected.")
system("cls");
// windows system("cls");
// linux system("clear");
// macOS system("clear");
#endif
#ifdef _linux_
#pragma message("linux system detected.")
system("clear");
#endif
#ifdef TARGET_OS_MAC
#pragma message("macOS detected.")
system("clear");
#endif
}
else if(command=="del")
{