能否請你告訴我如何更改BUF矢量的大小分爲動態長度初始化向量?具有動態長度
long five = 555;
char buf[256];
snprintf(buf, sizeof(buf), "%d", five);
THX!
如何改變我的std::vector<std::string>buf;
代碼才能正常工作?
我有錯誤:
vector is not a member of std;
buf was not declared in this scope and error: expected primary-expression before ">" token
'buf'不是一個向量。 – 2011-05-16 14:00:28
我已編輯我的代碼 – 2011-05-16 14:04:20
我想要轉換的值是long值; – 2011-05-16 14:05:49