Function
char* getConnectDetail(int starting){
String data;
for(int i=0;i< 1024 ;i++) {
if(EEPROM.read(i+starting) != 0){
data += char(EEPROM.read(i+starting));
}
}
int str_len = data.length() + 1;
char char_array[str_len];
data.toCharArray(char_array, str_len);
return char_array;
}
When I call it I get the garbage value... without creating the function there isn't any error.. Kindly solve it. I just want to know whats wrong with my returning method.
Arduino IDE function
... it is aC++ function