gpt4 book ai didi

c - 初始化元素在 C 中不是常量

转载 作者:太空狗 更新时间:2023-10-29 16:32:01 24 4
gpt4 key购买 nike

<分区>

我来自 javascript/php/python,可能我遗漏了一些东西,这是代码:

const int a = 50;
const int c = 100;
const int d = 100;
int endX = c + a;
int endY = d;
int startX, startY, b;

我明白了

ex1.4.c:6: error: initializer element is not constant
ex1.4.c:7: error: initializer element is not constant

有人有解释吗?

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