P
pandit
Hello
I am here Scuh a long time. i just want to print Date (Day of the
month) on the Screen i googling and Seach Archive i found it
but i dont know how this is to be used boz i need the system date(day)
or some Purpose
here is code i get from a web-site.
i am confuse about it
#include<ctime>
inr main()
{
time_t tt;
struct tm *tod; // why we use it?
time(&tt);
tod =localtime(&tt); //and also use?
std :: cout <<tod->tm_mon+1;
std:: cout<<std::endl;
exit(0);
}
whu we need struct here
please tell me.
Thanks
I am here Scuh a long time. i just want to print Date (Day of the
month) on the Screen i googling and Seach Archive i found it
but i dont know how this is to be used boz i need the system date(day)
or some Purpose
here is code i get from a web-site.
i am confuse about it
#include<ctime>
inr main()
{
time_t tt;
struct tm *tod; // why we use it?
time(&tt);
tod =localtime(&tt); //and also use?
std :: cout <<tod->tm_mon+1;
std:: cout<<std::endl;
exit(0);
}
whu we need struct here
please tell me.
Thanks