异常:“a” was not declared in this scope
错误:“a” was not declared in this scope ?
#include<iostream>
2 using namespace std;
3
4 int a;
5
6 int main()
7 {
8 folat a=3.14;
9 ::a=6;
10 cout<<"local variable a="<<a<<endl;
11 cout<<"global varible a="<<::a<<endl;
12 return 0;
13 }
错误在哪 求请教 小弟 新手望大家多多指教啊
------解决方案--------------------
folat a=3.14;
float, 写错了
------解决方案--------------------
还有最好这样写,float a = 3.14f;
3.14后面加一个f
------解决方案--------------------
------解决方案--------------------
把folat改成float就没有问题了。
#include<iostream>
2 using namespace std;
3
4 int a;
5
6 int main()
7 {
8 folat a=3.14;
9 ::a=6;
10 cout<<"local variable a="<<a<<endl;
11 cout<<"global varible a="<<::a<<endl;
12 return 0;
13 }
错误在哪 求请教 小弟 新手望大家多多指教啊
------解决方案--------------------
folat a=3.14;
float, 写错了
------解决方案--------------------
还有最好这样写,float a = 3.14f;
3.14后面加一个f
------解决方案--------------------
------解决方案--------------------
把folat改成float就没有问题了。