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;
}
也能运行的。
#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;
}
也能运行的。
相关文章推荐
- 谈新手对CString的使用
- vc中CString的使用
- 为什么头文件顺序不能乱写?为什么在win32控制台应用程序中不能使用CString?
- 使用CString 的 SpanIncluding 函数判断字符串是否全为数字
- 47.VC(custom)-string头文件与cstring头文件
- Queue和Stack头文件的使用
- 使用 include-what-you-use 检测冗余头文件
- VC程序在非MFC中使用CString
- string头文件与cstring头文件
- 使用Cout输出String和CString对象
- C语言头文件的使用(转)
- CString文件路径 使用fopen打开
- (转)CString的Format方法使用技巧总结(int|float|double转换为CString)
- ATL中使用CString
- 非MFC项目使用CString及如何打印
- (转)用javah 导出类的头文件, 常见的错误及正确的使用方法
- [转]CString类型的头文件、CString的输出、CString的常用用法
- VC2010 CString.Format使用报错 error C2664
- 在VS2013下如何使用头文件unistd.h和去除vs2013编译警告
- iOS开发之Xcode pch头文件简单使用方法 让写代码更简单!