I would like to get the thread ID in a numeric form with the following code:
#include <string.h>
...
pthread_t ptid = pthread_self();
unsigned long long threadId = 0;
memcpy(&threadId, &ptid, std::min(sizeof(threadId), sizeof(ptid)));
But I get this error:
error: ‘std’ undeclared (first use in this function)
17 | memcpy(&threadId, &ptid, std::min(sizeof(threadId), sizeof(ptid)));
| ^~~
How can I fix that?