在VC里不能用gettime()函数来实现获取当前时间吗
我原来在C里面这样用的,改到VC里面,提示说要先声明
我就在前面加上了
void gettime (struct time &t1,struct time &t2);
后面是这样调用的
gettime(&t1);
.................
gettime(&t2);
错误提示为
error C2660: 'gettime' : function does not take 1 parameters
error C2660: 'gettime' : function does not take 1 parameters
是哪里错了呢?
我原来在C里面这样用的,改到VC里面,提示说要先声明
我就在前面加上了
void gettime (struct time &t1,struct time &t2);
后面是这样调用的
gettime(&t1);
.................
gettime(&t2);
错误提示为
error C2660: 'gettime' : function does not take 1 parameters
error C2660: 'gettime' : function does not take 1 parameters
是哪里错了呢?
GetLocalTime(&systemtime);
在VC里使用MFC的话: CTime t = CTime::GetCurrentTime();
int i=t.GetDay();
等函数可以获得具体的值
有没有c的方法
在一堆c语句中插入两条c++语句行吗
SYSTEMTIME systemtime;
GetLocalTime(&systemtime);