Receiving String Array

edited May 2012 in Native
I'm new to native photon API, could anyone show me an example of properly parsing a 2-dimensional string array in c++ from an OperationResponse object? Thanks!!! :D

Comments

  • [code2=cpp]if(operationResponse.getParameters().getValue(ExitGames::KeyObject<ExitGames::JString>(ExitGames::JString("array2d"))))
    {
    ExitGames::ValueObject<ExitGames::JString**>* pTemp = 0;
    pTemp = new ExitGames::ValueObject<ExitGames::JString**>(operationResponse.getParameters().getValue(ExitGames::KeyObject<ExitGames::JString>(ExitGames::JString("array2d"))));
    arr = *(*pTemp).getDataAddress();
    arrLength = new short[(*pTemp).getDimensions()];
    for(unsigned int i=0; i<(*pTemp).getDimensions(); i++)
    arrLength = (*pTemp).getSize();
    wprintf(L"arr:\n");
    for(short i=0; i<arrLength[0]; i++)
    for(short j=0; j<arrLength[1]; j++)
    wprintf(L"%ls\n", arr[j].cstr());
    delete pTemp;
    delete[] arrLength;
    }[/code2]
Sign In or Register to comment.