# Include <iostream>
# Include <time. h>
Int main ()
{
Time_t curtime = time (0 );
TM Tim = * localtime (& curtime );
Int day, Mon, year;
Day = Tim. tm_mday;
MON = Tim. tm_mon;
Year = Tim. tm_year;
STD: cout <year + 1900 <"year" <mon + 1 <"month" <day <"day" <STD: Endl;
System ("pause ");
Return 0;
}
//// Process the input parameters with an indefinite length, which is generally used to print logs.
Writelog (char * format ,...)
{
Va_list ARGs;
Char Buf [4096];
Memset (BUF, 0,4096 );
Va_start (ARGs, format );
Vsprintf_s (& Buf [strlen (BUF)], 4096, format, argS );
Va_end (ARGs );
String strresult (BUF );
... // Perform other operations as follows
}
//// A and B mutual references
//// In the. h file:
Class B; // note that a. h cannot contain B. H.
....
Void fun (B * pb );
//// End of a. h
//// A. cpp file:
# Include "B. H"
Void fun (B * pb)
{....};
... // End of A. cpp
///// In the B. H file
# Include "A. H"
A * m_pa;
.....
//// End of B. H
///// In the B. cpp File
# Include "B. H"
....
M_pa = xxxx;
//// // End of B. cpp