0
我嘗試使用了iomanip格式化我的代碼的輸出:C++格式使用了iomanip
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2) << "Modified: resistor "<< rname << " to "<< res << " Ohms"<<endl;
,但我收到第三行錯誤:
error: invalid operands of types 'std::streamsize' and 'const char [20]' to binary 'operator<<'|