嘿伙计我有问题,我需要为二维阵列分配空间,但它不知何故被卡住了。之后它应该进入for循环,但它永远不会到达那里。有人知道为什么吗?
int len = read_file("staedte.csv", staedte, laender, bewohner);
char **resultat;
int resultatzaehler = 0;
resultat =(char **) malloc (100 * sizeof(char));
if(resultat == NULL){
printf("Malloc failed to allocate space");
exit(1);
}
for(int i = 0; i < 100; i++){
resultat[i] =(char *) malloc (100);
if(resultat[i] == NULL){
printf("Malloc failed to allocate spacce 2");
exit(1);
}
}
答案 0 :(得分:1)
您应该使用
进行分配CREATE TRIGGER TRG_QST_UPD
BEFORE UPDATE ON TD_QUESTION
FOR EACH ROW
IF OLD.qst_perma_title IS NULL THEN
SET NEW.qst_perma_title = OLD.qst_title;
END IF;