小编Wei*_*Wen的帖子

期待一个宣言.语法错误:','

#pragma once
#include <ctime>
#include "lib.h"

class testtime
{
public:
    int start_s = 0,stop_s = 0;
    void starttesttime(){
        start_s = clock();
        stop_s = 0;
    },
    stoptesttime(std::string t){
        stop_s = clock();
        std::cout << t << " time: " << (stop_s - start_s) / double(CLOCKS_PER_SEC) << std::endl;
        start_s = 0;
    };
};
Run Code Online (Sandbox Code Playgroud)

我得到了严重性代码描述项目文件行抑制状态

Error (active)  E0169   expected a declaration  test    c:\Users\AWW\Desktop\test\test\testtime.h   12 .  
Severity    Code    Description Project File    Line    Suppression State
Error   C2059   syntax error: ','   test    c:\users\aww\desktop\test\test\testtime.h   12  
Severity    Code    Description …
Run Code Online (Sandbox Code Playgroud)

c++

-2
推荐指数
1
解决办法
404
查看次数

标签 统计

c++ ×1