Reputation: 6797
For this line of code:
int currentSnapshotHeight = _wtoi(ExecuteExternalProgram(L"current.png"));
I got this error:
Error 1 error C2664: '_wtoi' : cannot convert parameter 1 from 'ATL::CString' to 'const wchar_t *'
How to fix?
Upvotes: 0
Views: 2758
Reputation: 987
Try this:
int currentSnapshotHeight = _wtoi((wchar_t*)ExecuteExternalProgram(L"current.png").GetBuffer());
Upvotes: 1
Reputation: 35229
Maybe this will work?
int currentSnapshotHeight = _wtoi(ExecuteExternalProgram(_T("current.png")));
Also check if Unicode setting of project are set as expected.
Upvotes: 2