没有足够的上下文信息来确定类型错误如何解决 [英] insufficient contextual information to determine type error how to solve
本文介绍了没有足够的上下文信息来确定类型错误如何解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
错误是没有足够的上下文信息来确定类型。
有错误的代码是:
The errors is insufficient contextual information to determine type.
The codes that have the errors are:
getData.setx(x);
getData.sety(y);
getData.setsunType(sunType);
和所有getdata.set
and all the getdata.set
MissionPlan::MissionPlan()
{
int choice;
switch(choice)
{
cout<<"Input statistical data"<<endl;
cout<<"Please enter x-cordinate:";
cin>> x;
getData.setx(x);
cout<<"Please enter y-cordinate:";
cin>>y;
getData.sety(y);
cout<<"Please enter sun type: TYPE:";
cin>>sunType;
getData.setsunType(sunType);
cout<<"Please enter no. of earth-like planets:";
cin>>noOfEarthLikePlanets;
getData.setnoOfEarthLikePlanets(noOfEarthLikePlanets);
cout<<"Please enter no. of earth-like moons:";
cin>>noOfEarthLikeMoons;
getData.setnoOfEarthLikeMoons(noOfEarthLikeMoons);
cout<<"Please enter ave. particulate density (%-tage):";
cin>>aveParticulateDensity;
getData.setaveParticulateDensity(aveParticulateDensity);
cout<<"Please enter ave. plasma density (%-tage):";
cin>>avePlasmaDensity;
getData.setavePlasmaDensity(avePlasmaDensity);
推荐答案
这不是有效的开关
声明,例如参见切换C ++参考a> [ ^ ]。
That's not a valid switch
statement, see, for instance "switch" at C++ reference[^].
这篇关于没有足够的上下文信息来确定类型错误如何解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文