[omniORB] How to assign a wchar_t array?

Slava Garelin garelin@ukr.net
Thu Dec 5 09:04:01 2002


5 Декабрь 2002 09:22, Uli Syber написал:

Hi, Uli.

IMHO like so:

> //sourcecode
> void Echo_i::echoString(Example::StringList_out idList)
> {
> 	//int i=0;
> 	int length;
>
>
> 	wchar_t** List=getIDList(&length);	//getIDList returned
> "return((wchar_t**)aArray);" with the length "length"
>

    idList = new Example::StringList(length);
    idList->length(length);

> 	for(i=0;i<length;i++)
> 	{
>
> 		//*(idList+i)=(wchar_t)*(List+i);

                            (*idList)[i] =List[i];
>
> 		//idList[i]=(wchar_t)*(List+i); didn?t work
>
> 		wprintf(L"myList: %s\n",*(List+i));
> 	}
> 	CoTaskMemFree(List);
>
> }
>

-- 
Slava Garelin