问题描述
我想要达到的目标: 我正在使用 Maat 网站,我想导出失败的导入,但我能够根据需要将错误映射到标题。
相关代码:
char** insere_jogada(char** tab,jogador j,int* linhas,int*colunas) {
int l,c,i;
char resposta,escolha;
char** aux = tab;
pede_espaco(&l,&c); // espaco q o jogador quer jogar
resposta = check_jogada(tab[l][c],j); //jogada
if(resposta=='A'){ // se escolher adicionar lin/col
j.lincol--; //fica sem oportunidade de adicionar mais linhas/colunas
escolha = pede_lincol(); // escolher entre adicionar linha ou coluna
if(escolha == 'L'){
printf("\nLines before %d",*linhas);
*linhas = *linhas + 1;
printf("\nLines after %d",*linhas);
// ----
aux = realloc(*tab,sizeof(char*)*(*linhas));
//also tried: tab = malloc(sizeof(char*)*(*linhas));
if(aux==NULL){
printf("Error.\n");
return tab;
}
//
}
else{
*colunas = *colunas + 1;
for(i = 0;i < *colunas; i++){
aux[i] = realloc(*tab,sizeof(char*)*(*colunas));
}
}
}
else{
tab[l][c] = resposta;
}
return aux;
}
这是我试过的:
'row' => 3,'attribute' => 'cau_cat','errors' =>
array (
0 => 'The cau_cat must be an integer.',),'values' =>
array (
'cus_name' => 'Felix','cus_dob' => '1999-05-02','cus_cat' => 1001,'cau_cat' => 'bew','cus_idtype' => 2,'cus_idnum' => 427107,'cus_type' => 2,'listtype_id' => 111,)),)
这会产生 logger($array['0']);
必须是整数。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)