2.1.6.15 convert_uint_vector_to_string_vector


Description

convert uint vector to string vector

Syntax

int convert_uint_vector_to_string_vector( const vector<uint> & vn, vector<string> & vs )

Parameters

vn
[input] uint array to convert
vs
[output] string vector for the result

Return

the number of converted items

Examples

EX1

void convert_uint_vector_to_string_vector_ex1()
{
    vector<string> strVec;
    vector<uint> unVec = {1,0,3,2,10,255,1024,8};
    int nRet = convert_uint_vector_to_string_vector(unVec , strVec );
    if(nRet)
    {
        printf("%d items converted :\n" , nRet); 
        for(int ii = 0; ii < strVec.GetSize() ; ii++)
            printf("%s   " , strVec[ii]);
        printf("\n");
    }
 
    else 
        printf("Convert failed");
}

Remark

See Also

convert_int_vector_to_string,

Header to Include

origin.h

Reference