Created
May 30, 2018 16:36
-
-
Save SCKelemen/2bff870407dc398d8fc76b00b67daa24 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CppGarcia.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <iostream> | |
#include <ctime> | |
bool licenseExpired() | |
{ | |
std::time_t t = std::time(0); | |
if (t > | |
1527739200) { | |
return true; | |
} | |
return false; | |
} | |
bool licenseCheck() { | |
if (licenseExpired()) { | |
std::cout << "License Expired!"; | |
return true; | |
} | |
return false; | |
} | |
int main() | |
{ | |
char ch; | |
if (licenseCheck()) { | |
std::cin >> ch; | |
return 1; | |
} | |
std::cout << "Program execution..."; | |
std::cin >> ch; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment