Is there easy way to do macro to string map?
For example,in Windows,if I want to make the error message of gethostbyname meaningful,I would need to manually map the error code to message, as follows, #include <stdio.h> #include <winsock2.h> #pragma comment(lib, "ws2_32.lib") int main(void) { struct hostent *host; WSAData wsaData; int errcode; if (WSAStartup(MAKEWORD(2, 2), &...