Question

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 know 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};

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top