gpt4 book ai didi

编译错误 "expected ' =', ' ,', ' ;', ' asm' 或 '__attribute__' token 之前的 '<'”

转载 作者:行者123 更新时间:2023-11-30 18:58:22 25 4
gpt4 key购买 nike

#include<stdio.h>
int main(){
register int i = 0;
for(i=0;i < 10; i++){
printf("\n i : %d \n",i);
}
return 0;
}

我正在尝试在循环计数器中使用寄存器的示例程序。

我在尝试编译程序时遇到以下错误,

register.c:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token

如何修复此编译错误。

最佳答案

尝试#include <stdio.h>您需要#。

关于编译错误 "expected ' =', ' ,', ' ;', ' asm' 或 '__attribute__' token 之前的 '<'”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16965066/

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