Ver. 25 >> doctxtname.cpp

/*
Ver. 24

1.)
Bug : cannot pass objects of non-POD type 'struct std::string' through
'...'
Wrong Code :
snprintf( titleBuf, TXT_NAME_LEN, "%d%s", 20, txtSuffixTitle );
Correct Code :
snprintf( titleBuf, TXT_NAME_LEN, "%d%s", 20, txtSuffixTitle.c_str() );

2.)
char*到 const char*直接給值就可以了, 所以在 snprintf 存到 char * buf 後,
可以直接將 buf 內容 assign 給 std::string newsSourceTitle 。
snprintf( titleBuf, TXT_NAME_LEN, "%d%s", 20, txtSuffixTitle.c_str() );
newsSourceTitle = titleBuf;

*/