关于声明;声明符是否有零声明说明符?
Every object declaration in C and C++ has two principal parts: a sequence of zero or more declaration specifiers, and a sequence of one or more declarators, separated by commas. For example:
是否零符意味着声明名为a
作为
a;
,而不是
int a;
变量? 我试图用一个例子
#include <stdio.h>
int main(){
x = 9;
printf("%d\n", x);
return 0;
}
,这是给了一个错误:
[Error] 'x' undeclared (first use in this function)
你是从哪里得到的?这显然是错误的。 –
对于具有“隐式诠释规则”的预标准化C可能是正确的。无论如何,这应该永远不会被使用。 –
@CarlNorum;我从[这里]得到了这个(https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&ved=0CEYQFjAD&url=http%3A%2F%2Fwww.dansaks。 COM%2Farticles%2F1998-06%2520Placing%2520const%2520in%2520Declarations.pdf&= rXrpUbKnAcrMrQfUjoCQBQ&USG = AFQjCNG8M1tyIyLS1jJ-bX5MXZ-TcjgYQg&SIG2 = 5pdYOyGUhbjWUp32yxLQvg&BVM = bv.49478099,d.bmk) – haccks