Code:
#include<iostream>
#include<stdlib.h>
using namespace std;
int main()
{
        int numnonterm;
        char terminal[10];
        char nonterminal[10][10];
        char tempterminal[10];
        cout<<"enter the terminals used";
        cin.getline (terminal,10);
        cout<<"enter the no of non terminal elements";
        cin>>numnonterm;
        cout<<"enter the nonterminals";
        cin.getline(tempterminal,10);
        
        if(int i=0)
        {
                return(0);
        }
}
the program exits without waiting for the user to enter the tempterm string .
have tried it several times but is not working
why?

Last edited by shabbir; 10Aug2011 at 21:35.. Reason: Code blocks