Friday 19 April 2013

SIMPLE DATE AND TIME FUNCTION IN C++

     /*
     THIS PROGRAMM DISPLAY DATE AND TIME
     */
     #include <iostream.h>
     #include <time.h>
     #include<conio.h>
     void main( )
     {
      int i=0;
      char dateStr [9];
      char timeStr [9];
      for(i=0;;i++)
      {
        clrscr();

        // FATCH DATE USING BELOW FUNCTION
         _strdate( dateStr);
        cout<<"\n\t\tDATE::"<<dateStr;

        // FATCH TIME USING BELOW FUNCTION

        _strtime( timeStr );
       cout<<"\n\t\tTIME::"<<timeStr;
       }
       getch();
      }

No comments:

Post a Comment

How to change Background color by selecting color from Listview

activitymain.xml file::> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xm...