加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

C2055错误 – 预期正式参数列表,而不是类型列表

发布时间:2020-12-16 10:34:00 所属栏目:百科 来源:网络整理
导读:我一直收到这个错误: C2055 error – expected formal parameter list,not a type list 我知道这意味着什么;我在互联网上看到它,但我不明白为什么我会继续得到它.我的代码中触发错误的部分(该文件名为other_funcs.c): #include "main_funcs.h"#include "ot
我一直收到这个错误:

C2055 error – expected formal parameter list,not a type list

我知道这意味着什么;我在互联网上看到它,但我不明白为什么我会继续得到它.我的代码中触发错误的部分(该文件名为other_funcs.c):

#include "main_funcs.h"
#include "other_funcs.h"

void addWord(sWord **first) //line #4
{
    sWord *after;
    char *input_string,*part;
    const char seperator[4] = "_#_";

    /.......bla bla.... more code.../

sWord是一个结构.错误是:

1>d:cs - exercisesex5backupnew folderother_funcs.c(4): error C2055: expected formal parameter list,not a type list

我不知道这是否有必要,但带有addWord()函数的头文件名为other_funcs.h:

#ifndef OTHER_FUNCS_H
#define OTHER_FUNCS_H

void addWord(sWord**);
char *inputString();
int badInput(char*);
void removeWord(sWord**);
int checkYear(sWord*,unsigned short);
int my_strlen(char*);
int countDist(char*,char*);
int new_alreadyThere(sWord*,char*)
#endif

解决方法

当你得到一个真正奇怪的编译器错误时,请查看前一行.

在这种情况下(忽略空格和预处理器指令),就是这个,来自头文件.

int new_alreadyThere(sWord*,char*)

你最后错过了一个分号.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读