0
你們可以幫助我理解函數m嗎?我們的想法是對printf「標籤」,但我不明白什麼是錯的C下標值既不是數組也不是指針也不是矢量
#include <stdio.h>
#define MAXL 50
#define MAXC 50
unsigned int linhas;
unsigned int colunas;
int segC [MAXL];
int segL [MAXC];
char tab[MAXL][MAXC];
void c(){
int l,c,temp;
scanf("%d %d",&linhas,&colunas);
for (l=0;l<linhas;l++){
scanf("%d[^'']",&temp);
segC[l]=temp;
}
for (c=0;c<colunas;c++){
scanf("%d[^'']",&temp);
segC[c]=temp;
}
for(l=0;l<=linhas;l++){
for(c=0;c<colunas;c++){
scanf("%c",&tab[l][c]);
}
}
}
char m (linhas,colunas,segC,segL,tab){
int l,c;
int tempi;
char tempc;
for(l=0;l<=linhas;l++){
for(c=0;c<colunas;c++){
printf("%c",tab[l][c]);
}
tempi=segL[l];
printf("%d\n",tempi);
}
for(c=0;c<colunas;c++){
tempi=segC[c];
printf("%d",tempi);
}
printf("\n");
}
char h (int line){
}
int main(){
c();
//m(linhas,colunas,segC,segL,tab);
}
哪條線路給您造成麻煩;請給出錯誤信息並解決問題 – 2015-04-02 21:00:25
是的,任何像樣的編譯器都會給你一些警告,首先消除這些警告。 – 2015-04-02 21:03:30
順便說一句''%d [^'']「' - >'」%d「' – BLUEPIXY 2015-04-02 21:29:02