I have created one project that is of Window Forms Application.
Some how I get one local path in one text box, so what I wanted to do is using that path I want to
get all folder present at that location should popup in Combo Box and List Box.
First I want to do it for combo box.
I tried in this way:
//Find the subfolder in folder that is Workbase
String^ workbase;
//Workbase_Subfeature is a text box
workbase = Workbase_Subfeature->Text;
String* d[] = Directory::GetDirectories(workbase);
int numDirs = d->get_Length();
for(int i=0; i < numDirs; i++)
{
//Find all folder in workbase and add to combo box
comboBox_Prog->Items->Add(d[i]);
}
but I am getting errors for this as below:
1) error C3699: '*' : cannot use this indirection on type 'System::String' for "String* d[]"
2) error C2728: 'System::String ^' : a native array cannot contain this managed type for "String* d[]"
3) error C2440: 'initializing' : cannot convert from 'cli::array<Type,dimension> ^' to 'System::String ^[]'
with
[
Type=System::String ^,
dimension=1
]
4) error C2227: left of '->get_Length' must point to class/struct/union/generic type
type is 'System::String ^[]' for "int numDirs = d->get_Length();"

New Topic/Question
Reply



MultiQuote





|