开发者

How to find the number of data added in CStringArray

开发者 https://www.devze.com 2022-12-11 03:44 出处:网络
Helo guys, I am working wid CStringArray and i want to know how to find the number of datas added in a CStringArray .in the below i have a defined the size of the array as 10 but i have added only thr

Helo guys, I am working wid CStringArray and i want to know how to find the number of datas added in a CStringArray . in the below i have a defined the size of the array as 10 but i have added only three 3 data,So i want to k开发者_如何学编程now the number of data's added to the array.(here its 3).Is there any way we can do it in CStringArray to find the number of data's added to array

CStringArray filepaths[10] = {path1.path2,path3};


CStringArray::GetCount()

Edit: In your code above you have actually created an array of CStringArray's. I am presuming you mean CStringArray from the Microsoft MFC library?

I think you want to be doing something like:

CStringArray filepaths;
filepaths.Add( path1 );
filepaths.Add( path2 );
filepaths.Add( path3 );
filepaths.GetCount(); //should ==3
0

精彩评论

暂无评论...
验证码 换一张
取 消