gpt4 book ai didi

c - 警告]数据定义没有类型或存储类[默认启用]

转载 作者:行者123 更新时间:2023-12-02 07:27:16 26 4
gpt4 key购买 nike

为了上大学,我需要使用提供的模板创建一个基本的桌面计算器。我已设法完成大部分工作,但第 9 行出现此错误消息 (iScreenSetup();:

" [Warning] data definition has no type or storage class [enabled by default]"

有什么建议吗?

#include "stdio.h"
#include "conio.h"
#include "stdlib.h"
#include "string.h"



/* Prototypes */
iScreenSetup();
iDataCapture();
iProcessData();
iReport();
iExit();

/* Declare and initialise global variables */
float fNum1 = 0.0;
float fNum2 = 0.0;
float fAns = 0.0;
int iOption = 0;



int main(void)
{
/* Set up the screen */
iScreenSetup();
/* Prompt the user and capture the data */
iDataCapture();
/* Process the data */
iProcessData();
/* Generate the report */
iReport();
/* Exit routine */
iExit();
} /* End of main */

最佳答案

您的原型(prototype)缺少返回类型。如果不返回任何内容,则为 void

/* Prototypes */
void iScreenSetup();

关于c - 警告]数据定义没有类型或存储类[默认启用],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26741277/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com