char **传参

    char **qName = new char*[2];
    qName[0] = new char[MAX_STRLEN];
    qName[1] = new char[MAX_STRLEN];  
    strncpy(qName[0],"c_device_index_code",MAX_STRLEN -1);
    strncpy(qName[1], "i_channel_no",MAX_STRLEN -1);
    requestNew->__sizequeryName = 2; //一维的长度一定要哦
    requestNew->queryName = qName;    

    char **qValue = new char*[2];
    qValue[0] = new char[MAX_STRLEN];
    qValue[1] = new char[MAX_STRLEN];
    strncpy(qValue[0],request.devIndexCode,MAX_STRLEN -1);
    strncpy(qValue[1],request.channel,MAX_STRLEN -1);
    requestNew->__sizequeryValue = 2; //一维的长度一定要哦
    requestNew->queryValue = qValue;

    fun( requestNew->queryValue,requestNew->__sizequeryValue)

    fun( char **,int size)
    {
    }

你可能感兴趣的:(C++)