Go Down

Topic: Char conversion error - need Char to send HTTP GET request.... (Read 454 times) previous topic - next topic


I want to send GPS coordinates over GPRS via HTTP GET request but I have following problem.. I cant get the values into the request.
Below my code, has anybody an idea? Thank you !!!

My variables:

char latitude[20];
char longitude[20];

The function needs:

bool placeGetRequest(char* hostName, char* resourcePath, uint16_t dataSize){.....

My command:

placeGetRequest("www.google.com", "/index.html?lat="+=latitude+="&long"+=longitude, 500);

I get following error:
ScooterGPSalert:69: error: invalid operands of types 'const char [6]' and 'char [20]' to binary 'operator+'
ScooterGPSalert:69: error: in evaluation of 'operator+=(const char [6], char [20])'

Nick Gammon


Nick Gammon


Go Up