If you are talking about assigning a value, then how you do it is perfect. If you use Visual C ++ and want to copy w-strings, use the more secure wcscpy_s function (it is more secure than wcscpy).
errno_t wcscpy_s( wchar_t *strDestination, size_t numberOfElements, const wchar_t *strSource );
I will give you a small example:
wchar* wstrOther = "hello"; wcscpy_s(foo, 200, wstrOther);
Simon source share