Код: Выделить всё
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <process.h>
#include <time.h>
using namespace std;
int main(int argc, int *argv[])
{
time_t seconds = time(NULL);
tm* timeinfo = localtime(&seconds);
char* format = "%H:%M";
char buffer[80];
strftime(buffer, 80, format, timeinfo);
cout << "Current Datetime: " << buffer << endl;
execl("c:\\WINDOWS\\system32\\notepad.exe", "c:\\WINDOWS\\system32\\notepad.exe", NULL);
return 0;
}