I'm trying to get the time in months and days, but I've only found codes in C to do that.
Actually, the intention of this is to tar a file, and record the month and day somewhere, ideally in the name, but a hidden file would also work.
Here's the program as it is now, no time function.
Code:
#include <iostream>
#include <stdlib.h> //For system()
using namespace std;
int main()
{
//Creates a hidden tarball in home.
system("tar -cvvf ~/.Record.tar Record/");
}
If I wanted to make a variable go in the name, would it be done as system("tar -cvvf ~/."<< x <<"Record.tar Record/"); ?