I have these variables:
char* name = "bobsux";
int score = 100;
char* scoreHash = "f899139df5e1059396431415e770c6dd";
Printing these using format specifiers and printf, returns this:
printf("name=%s&score=%d&score_hash=%s", name, score, scoreHash);
=> name=bobsux&score=100&score_hash=f899139df5e1059396431415e770c6dd
How can I make a variable that returns the same? Failed attempt:
char* scoreData = ("name=%s&score=%d&score_hash=%s", name, score, scoreHash);
=> f899139df5e1059396431415e770c6dd
I want the variable to be like the printf return, so that I can send scoreData to a web server:
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, scoreData);