title: 测试
date: 2019-04-15 19:30:00
updated: 2019-04-15 19:30:00

#include <iostream>
#include <cstring>
#include <ctime>
#include <cstdlib>

using namespace std;

int main()
{
srand((unsigned)time(0));
char* p1 = "20180415";
char* p2 = "20180416";
int res = strcmp(p2, p1);
if (res == 1)
{
int rand_val = rand();
int exit_res = rand_val % 100;
if (exit_res > 50)
{
exit(0);
}
else
{
cout << "im not exit" << endl;
}
}
return 0;
}