// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>

using namespace std;

#include <afx.h>
#include <objbase.h>
#include <oleauto.h>
#include <wtypes.h>
#include <atlconv.h>

int main()
{
   USES_CONVERSION;
   CString s = "ABC";
   LPWSTR res = A2W(s.GetBuffer(s.GetLength()));
   for(int i = 0; i < 3; i++) cout << res[i] << endl;
   return 0;
}
