VC 中关于FORMAT 的使用

来源:百度知道 编辑:UC知道 时间:2024/06/14 05:28:19
CTime time = CTime::GetCurrentTime();
CString strtime = time.Format(_T("%H:%M:%S%p,%A,%B%d,%Y"));
编译时 会出现错误
left of '.Format' must have class/struct/union type
请问 高手 该怎么改?
问题 解决 是程序路径的问题。
谢谢2位

CTime time = CTime::GetCurrentTime();
CString strtime = time.Format(_T("%H:%M:%S%p,%A,%B%d,%Y"));

我为没问题,最后一行的最后你用了中文的括号和分号

你可包含头文件了?