我是 C/C++ 的新手,我一直在使用 python,我正在尝试获取当前时间并对其进行分区,但是我在使用ctime
.
float t2lmst(){
QString t = ctime(time_t); //line with error
QString year =t.substr(20,4);
QString monthn =t.substr(4,3);
QString day =t.substr(8,2);
QString hour =t.substr(11,2);
QString minute =t.substr(14,2);
QString second =t.substr(17,2);
}
错误正是:
error: expected primary-expression before ')' token