error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
i did #include<string>
#include <iostream>
#include <string>
using namespace std;
class Frog{
private:
public:
int length;
string movement0;
string movement1;
string movement2;
string stage0;
string stage1;
string stage2;
movement0="roll";
movement1="swim";
movement2="jump";
stage0="egg";
stage1="tadpole";
stage2="adult";
Frog(int age){
length = age;
}
void showStage(int age){
cout<<length;
}
void Move(int age){
switch(age){
case 1:
cout<<"The Current Stage:"<<stage[0]<<endl;
break;
case 2:
cout<<"The Current Stage:"<<stage[0]<<endl;
break;
case 3:
cout<<"The Current Stage:"<<stage[0]<<endl;
break;
case 4:
cout<<"The Current Stage:"<<stage[1]<<endl;
break;
case 5:
cout<<"The Current Stage:"<<stage[1]<<endl;
break;
case 6:
cout<<"The Current Stage:"<<stage[1]<<endl;
break;
case 7:
cout<<"The Current Stage:"<<stage[1]<<endl;
break;
case 8:
cout<<"The Current Stage:"<<stage[1]<<endl;
break;
default:
cout<<"The Current Stage:"<<stage[2]<<endl;
break;
}
}
};
int main(){
int age;
int opt;
cout<<"Enter Frog days";
cin>>age;
cout<<"Enter option";
cin>>opt;
Frog t1(age);
if(opt==0){
t1.showStage(age);
}
if(opt==1){
t1.showStage(age);
}
if(opt==2){
t1.showStage(age);
}
return 0;
}
i am new to c++ please advise

New Topic/Question
Reply




MultiQuote





|