Time passed by merrily as we celebrate Thanksgiving, Christmas is about to come and have you ever prepared for the happiness that you will have?
I want the PATH to be c:/TIME FOR NOW.txt, but the problem is it turns an error, can anyone help me out?Code:#include <iostream> #include <time.h> #include <stdio.h> using namespace std; int main(){ time_t T; FILE *t; time(&T); char PATH[256]="c:/" + ctime(&T) + ".txt"; t=fopen(PATH,"r"); fclose(PATH); return 0; }





Reply With Quote