gpt4 book ai didi

c - 我在编译这个 c 程序时遇到这些错误

转载 作者:行者123 更新时间:2023-11-30 15:19:28 25 4
gpt4 key购买 nike

#include<stdio.h>
main()
{
int num1,num2,sum;
printf("Enter the two integers to be added");
scanf("%d %d", &num1, &num2);
sum = num1+num2;
printf("Addition of %d and %d = %d", num1, num2, sum);
}

我得到的错误是:

  1. Unable to open include file 'stdio.h'

  2. Function printf should have a prototype.

  3. Function scanf should have a prototype.

最佳答案

确保您已正确安装 C 编译器。如果您使用的是 Linux 操作系统,那么它是预先安装的。

关于c - 我在编译这个 c 程序时遇到这些错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30634432/

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