首先請原諒我的英文不好。 我有產生LPCSTR值列表的功能,我想所有他們每個人添加到list<LPCSTR>或vector<LPCSTR>,這是我的示例代碼: vector<LPCSTR> output={}; // or list<LPCSTR>
...
for (....)
{
auto anItem = static_cast<LPSTR>(malloc(20));
在C++中, 我得叫一個字符串數組變量: ...
/* set the variable */
string fileRows[500];
...
/* fill the array with a file rows */
while (getline(infile,sIn))
{
fileRows[i] = sIn;
i++;
}
,並具有這樣的一個對象: