redefinition; different type modifiers错误解决
调用之前需要声明:void action1(int,int),action2(int,int);
否则会出现redefinition; different type modifiers这个错误,原因是定义和声明时,参数个数,类型,返回值类型不一样,或者是先调用了函数,没声明,定义在后面也会有这种情况。
#include<stdio.h>
int main()
{
void action1(int,int),action2(int,int); //此处此处此处需要注意
char ch;
int a=15,b=23;
ch=getchar();
switch(ch)
{case'a':case'A':action1(a,b);break;case'b':case'B':action2(a,b);break;default:putchar('\a');
}return 0;
}
void action1(int x,int y) //执行加法函数
{printf("x+y=%d\n",x+y);
}
void action2(int x,int y) //执行乘法函数
{printf("x*y=%d\n",x*y);
}
redefinition; different type modifiers错误解决相关推荐
- sklearn中ValueError: Unknown label type: ‘continuous‘错误解决
ValueError: Unknown label type: 'continuous'错误解决 今天在做决策树鸢尾花分类时出现了一个错误: 解决方法是:train_y后加上astype('int') ...
- Struts Form中Date类型之“argument type mismatch”错误解决方法
现象: 当输入页面中含有日期如2008-01-01时,如果Form中对于的字段为Date类型,则会出现"argument type mismatch"错误. 原因: Struts的 ...
- The method getTextContent() is undefined for the type Node 错误解决办法
在开发项目中,出现一个错误:The method getTextContent() is undefined for the type Node,解决办法: 网上查大部分是说jdk版本问题,发现不是, ...
- Flutter 之A value of type ‘‘ can‘t be assigned to a variable of type的错误解决笔记
最近工作不是很忙,于是乎又是捡起Flutter继续学习.在github上找到一个flutter的学习demo,准备学习学习其动画. 运行github上的代码发下了如下错误: Error: A valu ...
- Arithmetic overflow error converting numeric to data type numeric错误解决
最近,发现一个定时任务报错,报错日志如下: java.sql.SQLException: Arithmetic overflow error converting numeric to data ty ...
- EF中Unable to create a constant value of type...的错误解决
出现此错误的原因是因为在进行查询之类的操作中,未使用基本数据类型 举个栗子 td.translations.Where(t => t.textinfo == ti).Count() 错误,此处使 ...
- Undefined function or method ' ' for input arguments of type 'double' ---错误解决办法
你如果要使用这个guo.m作为函数进行调用的话,那需要满足以下条件:1.在guo.m里面要写成function的格式function [output parmaters]=guo[input para ...
- error: variable has incomplete type ‘QApplication‘ 错误解决
我出现这个问题是在浏览头文件的时候,不小心把类名个删掉了,如图 加上类名就可以了
- error: variable '__this_module' has initializer but incomplete type错误解决
问题描述:编译内核驱动时候会出现error: variable '__this_module' has initializer but incomplete type错误 解决办法:1.make me ...
最新文章
- 程序员哀叹:专科都是ji's万的年薪,互联网的泡沫要破了
- VsCode 配置 C/C++ 开发环境,真的很简单
- MySQL count(1) count(*) 比较 详解
- jmeter学习笔记(八-1)
- AOP Error creating bean with name ‘myCaculator‘ defined in file [XXX]
- 用Redis实现分布式锁 与 实现任务队列
- 极限学习机和支持向量机_极限学习机的发展
- 使用python爬取网站源代码
- hadoop启动mysql服务_Hadoop MySQL 服务自启动配置
- STM32单片用什么编程?如何学习STM32单片机开发
- 从网易博客转入CSDN
- 10 分钟搞定 Vim 编辑器常用命令!
- 一起学习R语言吧——R语言+RStudio
- Google Material Design 元件库
- 响应式极简新闻发布系统模板 v4.88
- C#图像处理:在图片上写字,文字位置居中问题
- 简单理解:第一类错误,第二类错误,统计显著性,空假设和P值
- (FAQ)现购的采购发票保存时提示:超过最大可钩稽数值[金蝶K/3]
- Invoking “cmake“ failed报错
- 牛客15029数泡泡