cancel
Showing results for 
Search instead for 
Did you mean: 

static_cast in C?

Panagiotis
Associate III
freqError = static_cast<int32_t>(readRegister(REG_FREQ_ERROR_MSB) & B111);

C has no static_cast, so how can I convert the above code to C?

(It 's C++, from Arduino)

2 REPLIES 2
berendi
Principal
freqError = (int32_t)(readRegister(REG_FREQ_ERROR_MSB) & B111);

Panagiotis
Associate III

Thank you!