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