# CharArrayToStruct Copy uchar type array to [POD structure](/en/docs/basis/types/classes#simple_structure). ``` bool  CharArrayToStruct(    void&         struct_object,    // structure    const uchar&  char_array[],     // array    uint          start_pos=0       // starting position in the array    ); ``` Parameters struct_object [in]  Reference to any type of [POD structure](/en/docs/basis/types/classes#simple_structure) (containing only simple data types). char_array[] [in] [uchar](/en/docs/basis/types/integer/integertypes) type array. start_pos=0 [in]  Position in the array, data copying starts from. Return Value Returns true if successful, otherwise false. Example: ``` #define DATA_TOTAL 4   MqlRates ExtDataRates[DATA_TOTAL]; uchar    ExtCharArray[];   //+------------------------------------------------------------------+ //| Script program start function                                    | //+------------------------------------------------------------------+ void OnStart()   { //--- copy the data of the last four bars into the uchar array    ResetLastError();    for(int i=0; i