c++ string to wstring code example Example: string to wstring conversion c++ string str = DATA_DIR; std::wstring temp(L"%s",str);