How do I combine both string and array in a string variable in Arduino's C/C++ dialect? I tried to run below lines but doesnt work.
int j = 0;
String value1[] = {0,1,2,3};
String httpRequestData = "&value1=" + value1[i] + "";
//then number of j++
How do I combine both string and array in a string variable in Arduino's C/C++ dialect? I tried to run below lines but doesnt work.
int j = 0;
String value1[] = {0,1,2,3};
String httpRequestData = "&value1=" + value1[i] + "";
//then number of j++
You need to initialize your string before concatenate different types.
More details here https://www.arduino.cc/en/Tutorial/StringAdditionOperator
int j = 0;
int value1[] = {0,1,2,3};
String httpRequestData = String("&value1=");
httpRequestData += value1[i];