i guess its pretty self explanatory, i want to be able to create a new folder every day and 00:00:00 hrs.
the folders have to be named after the day of the year since the 1st of jan. i.s. 15th February would be 46.
i have the time code:
Code:
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <time.h>
int main ()
{
using namespace std;
while(true)
{
time_t rawtime; //time since 1st Januay 1970
time(&rawtime);
unsigned int clock = rawtime + 7200; // + 7200 for Madrid Time
unsigned int hour = (clock / 3600) % 24;
unsigned int minute = (clock % 3600) / 60;
unsigned int second = clock % 60;
cout<<hour % 12<<":";
if(minute < 10)
{
cout<<"0";
}
cout<<minute<<":";
if (second < 10)
{
cout<<"0";
}
cout<<second;
if(hour >= 12)
{
cout<<" P.M."<<endl;
}
else
{
cout<<" A.M. "<<endl;
}
system("cls");
}
system("pause");
return 0;
and the directory code.....
Code:
CreateDirectory("c:\\temp\\test", NULL);
printf("Directory created\n");
but i cant get them to link together!!
dammit!!