您的位置:首页 > 其它

CString 使用的头文件

2011-08-31 12:44 48 查看
使用win32控制台应用程序也能调通的啊,按Alt+F7,在C/C++的Category中选Code Generation,然后Use run-time library选Multithreaded,然后我直接写的代码:

#include <afx.h>

#include <iostream.h>

#include <time.h>

#include <afxtempl.h>

void main()

{

CString MyString;

CTime t=CTime::GetCurrentTime();

cout < <t.GetYear() < <endl < <t.GetDayOfWeek()

< <endl < <t.GetTime() < <endl < <t.GetGmtTm()-> tm_year < <endl;

MyString=t.Format( "%A, %B %d, %Y ");

cout < <t.GetLocalTm()-> tm_year < <endl < <MyString;

}

也能运行的。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: