I’m new to C/C++ and I’m working on some old code that requires a char pointer. Is this code below the best approach for concatenating several values into a char pointer? TIA
char buffer[32];
sprintf(buffer, "INSERT INTO IDTBL(ID1, ID2, ID3) VALUES (%u, %u, %u);", id1, id2, id3);
char *sql = (char*) buffer;