Go Down

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

thomsenLE

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

Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Nick Gammon

Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up