I am trying to fill vector src.Files with values of file names, having problems with different types. When I try to pass search_data.cFileName directly to the vector it showed error:
When I try to pass the
cannot convert parameter 1 from 'WCHAR [260]' to 'const std::basic_string<_Elem,_Traits,_Ax> &'
When I try to separate it to variable test. It shows error
C2440: '=' : cannot convert from 'WCHAR [260]' to 'WCHAR *[260]'
There is no context in which this conversion is possible
Be glad that you made a mistake; for there is no copy assignment for plain arrays.
The original error, "cannot convert WCHAR [260] to std::string", is clear too:
vector::insert() expects a reference to std::string, but you tried to offer an array of WCHAR.
How would you create a string from array of characters?
I thought that UNICODE is multibyte... That was why I used it. I changed settings in the project to use Multibyte. Is there now some macro which identifies that the multibyte is defined? So I used the code of kbw - thanks, it works now :-).