c99隐试声明报错,有没有大佬帮忙看看

Gnglas 2020-04-04 12:28:38
头文件

#ifndef AVL_H_
#define AVL_H_
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define Size 20
#define STREND char *
typedef struct Node
{
char name[Size];
int size;
struct Node *left;
struct Node *right;
}node;
typedef struct Tree_size //number tree for size
{
unsigned int left;
unsigned int right;
}tr_size;
STREND s_ges(char *str,int n) // input funicnt
{
STREND str_end = NULL;
STREND find = NULL;
str_end = fgets(str,n,stdin);
if(str_end)
{
find = strchr(str,'\n');
if(find)
*find = '\0';
else
while(getchar() != '\n')
continue;
}
return str_end;
}
node * Init_Node(node * tree,char *str_end, int n) //init tree for node
{

tree =(node *) malloc(sizeof(node));
strcpy(tree->name,str_end);
tree->size = n ;
tree->left = NULL;
tree->right = NULL;
return tree;
}
void Puts_tree(node *tree) //puts tree
{
if(tree != NULL)
{
printf("==>tree->str :%s\n ==>tree->size : %d\n",tree->name,tree->size);
Puts_tree(tree->left);
Puts_tree(tree->right);
}
}
#endif

代码
#include "avl.h"
node *List_tree(node *root,node *ned);
node *SingleRotationForLeft(node *root);
int main(void)
{
char str[Size];
int number = 0;
node *root = NULL,*strend = NULL;

while(s_ges(str,Size) != NULL && str[0] != '\0')
{
if(root == NULL)
{
strend = Init_Node(root,str,number);
root = strend;
number += 1;
}
else
{
strend = Init_Node(strend,str,number);
root = Link_list(root,strend);
number += 1;
}
}
Puts_tree(root);
return 0;
}

node * Link_list(node *root,node *strend)
{

if(root)
{
if(root->name < strend->name)
{
if(root->left == NULL)
{
root->left = strend;
strend->size = root->size + 1;
}
else
Link_list(root->left,strend);
}
if(root->name > strend->name)
{
if(root->right == NULL)
{
root->right = strend;
strend->size = root->size + 1;
}
else
Link_list(root->right,strend);
}
}
return root;
}
node *SingleRotationForLeft(node *root)//旋转
{


return root;
}





求大佬帮忙看看,这个是什么情况
...全文
188 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Gnglas 2020-04-04
  • 打赏
  • 举报
回复
第一次碰到这种报错,请大佬瞧瞧
Gnglas 2020-04-04
  • 打赏
  • 举报
回复
引用 2 楼 akari10032的回复:
Link_list没声明,隐式函数声明的返回值是int,还有你这是什么插件,能在当前行显示错误
coc.nvim,国人照启明开发的
akari10032 2020-04-04
  • 打赏
  • 举报
回复
Link_list没声明,隐式函数声明的返回值是int,还有你这是什么插件,能在当前行显示错误

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧