当我尝试添加bool operator==(complx a, complx b)时说
|Code |Description
|EO344 too many parameters for this operator function
Run Code Online (Sandbox Code Playgroud)
我尝试仅使用一个参数,但无法执行。
这是实际功能:
//boolean operators "|Code |Description
bool operator==(complx a, complx b) //error: " EO344 too many parameters for this operator function"
{
/*error code*/return a.real() == b.real() && a.imag() == b.imag();
}
Run Code Online (Sandbox Code Playgroud)
它说参数太多,但我的书说没有。你能帮助我吗?
我想像这样添加一个延迟:
std::cout << "loading..." << endl;
//add delay here
Run Code Online (Sandbox Code Playgroud)
是否有某种delay功能或
delay库