新人求救,一个程序搞不定!
#define LENGTH 4#include <stdio.h>
main()
{
char source[LENGTH];
int counter;
void Permute(char[],int,int);
for(counter=0;counter<LENGTH;counter++){
source[counter]='a'+counter;
}
PERmute(source,LENGTH,0);
}
void Permute(char source[],int length,int front)
{
char buffer[LENGTH];
int counter;
int number;
int index;
if(front==length-1){
printf("\n");
for(counter=0;counter<length;counter++){
printf("%4c",source[counter]);
}
}
else{
for(number=front;number<length;number++){
for(counter=0;counter<front;counter++){
buffer[counter]=source[counter];
}
buffer[front]=source[number];
index=front+1;
for(counter=front;counter<length;counter++){
if(counter!=number){
buffer[index++]=source[counter];
}
}
Permute(buffer,length,front+1);
}
}
}
在TC2.0环境下出现了这样的错误: inker error: undefined symbol '_PERmute' in moldule QPAILIE.C
什么意思啊? PERMUTE是排列的意思,难道说我的TC2.0缺少东西?