I\'m so confused with sprintf that a funny problem with different platfrom. Code :
int main ()
{
char sql[1024];
uint32_t app_id = 32;
uint64_t
Use %llu
format string for task_id
in sprintf()
as follows:
sprintf(sql, "%llu, %u", task_id, app_id);
// ^
// for: long long unsigned int
Edit: As @Simonc suggested its better to use: PRIu32
and PRIu64
macros defined in
(as you have Linux tag) do like:
sprintf(sql, "%"PRIu64", %"PRIu32"", task_id, app_id);
// ^ ^
// for: uint64_t uint32_t