H
Herby
I originally had:
String^ line = gcnew String("abc, def; ghi" );
array<String^>^ mapEntries = line->Split(',');
I now want to extend this to include the semi-colon - something like
array<String^>^ mapEntries = line->Split( gcnew Char [] {',',';'});
i just cannot do it without getting a great list of errors:
..error C2552: '$S3' : non-aggregates cannot be initialized with
initializer list
'wchar_t *' is not an array or class : Types which are not
array or class types are not aggregate
error C2143: syntax error : missing ')' before '{'
error C2664: 'cli::array<Type>
^System::String::Split(cli::array<wchar_t,dimension> ^)' : cannot
convert parameter 1 from 'wchar_t *' to 'wchar_t'
with
[
Type=System::String ^,
dimension=1
]
There is no context in which this conversion is possible
error C2143: syntax error : missing ';' before '{'
error C2143: syntax error : missing ';' before '}'
error C2059: syntax error : ')'
What do i have to do?
String^ line = gcnew String("abc, def; ghi" );
array<String^>^ mapEntries = line->Split(',');
I now want to extend this to include the semi-colon - something like
array<String^>^ mapEntries = line->Split( gcnew Char [] {',',';'});
i just cannot do it without getting a great list of errors:
..error C2552: '$S3' : non-aggregates cannot be initialized with
initializer list
'wchar_t *' is not an array or class : Types which are not
array or class types are not aggregate
error C2143: syntax error : missing ')' before '{'
error C2664: 'cli::array<Type>
^System::String::Split(cli::array<wchar_t,dimension> ^)' : cannot
convert parameter 1 from 'wchar_t *' to 'wchar_t'
with
[
Type=System::String ^,
dimension=1
]
There is no context in which this conversion is possible
error C2143: syntax error : missing ';' before '{'
error C2143: syntax error : missing ';' before '}'
error C2059: syntax error : ')'
What do i have to do?