Skip to content

Instantly share code, notes, and snippets.

@SCKelemen
Created May 30, 2018 16:36
Show Gist options
  • Save SCKelemen/2bff870407dc398d8fc76b00b67daa24 to your computer and use it in GitHub Desktop.
Save SCKelemen/2bff870407dc398d8fc76b00b67daa24 to your computer and use it in GitHub Desktop.
// 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