struct in struct

class Calculator
{
private :
static int com_num;
static int digit_num;
struct command
{

string name,comd;
struct variable
{
char converting[NUMBER];
double digit;
};
variable var[Max];
};
command command[Max];
public :
void user_input(){
//this is the function to proceed the first task
string command1;
double result;

cout<<endl<<"Equation variables can be any alphabet from a to z or A to Z."
<<"\nAll objects of the equation must be separated by [space]."
<<"\nA sample equation is 'a pow 2 * pi + 2.9'.";
cout<<END;
cout<<"Input your equation : ";
cin.ignore();
getline(cin,command[99].comd);
command1=command[99].comd;

result=user_input_result(command[99].comd);
cout<<endl<<command1<<" = "<<result<<END;


}

can someone tell me why we need structure inside structure?
can we use other than 99 in the command and what is the purpose of using 99.
thank you so much.
There isn't enough information to be able to answer either question.
Topic archived. No new replies allowed.