Hi everyone is a bit of time we program with IDE 1.8 and C.
I thought I would do a program
I have a variable A = 3 and a variable B = 4 I would have a variable C = 3.4
This program in C works:
#include
#include <string.h>
#include <stdlib.h>
using namespace std;
main () {
char string [4];
string [0] = ‘3’;
string [1] = ‘.’;
string [2] = ‘4’;
float f;
f = strtof (string, NULL);
cout << f << endl;
}
I print “3,4”. If I want to load it in the arduino IDE by mistake “STRTOF”, how can I write the same program in the arduino IDE?