Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5361

Français • Re: gpio c++

$
0
0
)Votre souci se produit il dans

Code:

 cout << "ds_temperature[0] // temperatureExt = " << (int (           ds_temperature[0] * 2) ) / 2.0 << " °C " << endl; // sonde NORD
(extrait de https://github.com/ludoiphone/gainable/ ... inable.cpp , vers la ligne 788)

Je ne peux pas reproduire ce souci sur mon RPi (bullesye)

Code:

pi@raspberrypi:~ $ nano t.cpp  # fabrication du bout de codepi@raspberrypi:~ $ g++ t.cpp # compilation pi@raspberrypi:~ $ ./a.out # executionds_temperature[0] // temperatureExt = 11 °C pi@raspberrypi:~ $ cat t.cpp#include <iostream>using namespace std;int main() {  float ds_temperature[3] = {11.1, 0, 0};  cout << "ds_temperature[0] = " << (int (           ds_temperature[0] * 2) ) / 2.0 << " °C " << endl; // sonde NORD}

Statistics: Posted by dbrion1 — Fri Feb 23, 2024 10:26 am



Viewing all articles
Browse latest Browse all 5361

Trending Articles