sprintf(buf, "%d ", quantity);
snprintf(buf, 20, "%d ", quantity);
static void get_plural_name	(	const char *name,	int quantity,	string& output_name	)	{	char buf[20];	sprintf(buf, "%d ", quantity);	// Output the quantity	output_name = buf;					// Skip the first part	while(*name != '/' && *name != '\0')		name++;	if(*name == '\0')		// should not happen		{		output_name = "?";		return;		}	name++;					// Output the second part	while(*name != '/' && *name != '\0')		output_name += *name++;	if(*name == '\0')		// should not happen		{		output_name = "?";		return;		}	name++;					// Skip the third part	while(*name != '/' && *name != '\0')		name++;	if(*name == '\0')		// should not happen		{		output_name = "?";		return;		}	name++;	while(*name != '\0')		// Output the last part		output_name += *name++;}