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