0
auto size = new std::atomic<double>(0);
double packet_size = 64e3;
*size += packet_size;
을하지만이 오류가 발생했습니다.
no match for ‘operator+=’ (operand types are ‘std::atomic<double>’ and ‘double’)
어떻게이 두 숫자를 올바르게 추가해야합니까?
'std :: 원자 '은 C++ 20까지 표시되지 않습니다. 그것을 지원하는 컴파일러가 있습니까? –
DeiDei
@DeiDei; 심지어 불평하지 ... http://coliru.stacked-crooked.com/a/24b749dce3f8d705 – user1810087
당신은이 답변을 볼 수 있습니다 https://stackoverflow.com/questions/23116279/how-to-perform-basic- operation-with-the-not-integral-when-type-is-not-integral –