Reputation: 1
we are migrating code to VS 2019 from legacy code
We have an overloaded function on operator '<<' that is invoking basic_ostream function when executing the following lines.
CStringArray asLine;
using ostream = basic_ostream<char, char_traits<char>>;
ostream os;
os << (LPCTSTR)asLine[nLine2]; <---- this line is producing the C2280 error with message
"basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const wchar_t*) = delete"
This was working in legacy application. how to overcome this issue?
please suggest any workaround
CStringArray asLine; // class with set and get functions.
ostream os;
int nLine2 = 20; // nline has subscript valve to the asline[]
os << (LPCTSTR)asLine[nLine2];
Upvotes: 0
Views: 62