即 -
int function(char* txt)
{
sprintf(txt, "select * from %s;", table);
//How do I set last char in buffer to NULL here?
}
如果表格中的文本长度为500个字符,而主体中定义的文本长度只有100个字符……
谢谢。