本文介绍了请看看,C编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的节目源代码。



This is my program souce code.

#include <stdio.h>
#define MAXLINE 100 //most input

int compare1(int savewl[]);//  array name  of save and the first character of the word and the line.

void getcl(int savewl[],int next)   //get by the character length,save to array
{
  int i,c;

  for(i = 0;(c = getchar())!= EOF;++i)
    if(c == '\n'){
      ++next;
      i = 0;
    }
    else
      savewl[next] = i;
}

main() //print to everyone word length
{
  printf("How many the number is \n");

  int next,i;
  int save[MAXLINE];
  next = 0;

  getcl(save,next);
  next = compare1(save);
  for(i = 0;i <= next;++i)
    printf("H");

  return 0;
}

int Compare1(int s[]) //compare character. compositor
{
  int n1,n2,r;  //next and reture
  r = 0;

  for(n1 = 0;n2 <= MAXLINE;++n1)
    for(n2 = 1;n2 <= n1;++n2)
      if(s[n1] > s[n2])
    r = s[n1];
      else
    if(s[n1] < s[n2])
      r = s[n2];
    else
      ;
  return r;

}





错误:函数'main'未定义引用'compare1'



请帮帮我



error: In function 'main' undefined reference to 'compare1'

please help me

推荐答案

next = Compare1(save);



这篇关于请看看,C编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 01:27