tree234 class crashes
after fixing  error related with switch statment,i have following list of error,hen i used debugger(reason was that,problem is going to crashes when i run it)
code is again this one

    #include<iostream>
    #include<cstring>
    using namespace std;
    class data
    {
    public:
    	long ddata;
    	data(long dd)
    	{
    		ddata=dd;
    	}
    	void display()
    	{
    		cout<<ddata<<"  ";
    	}
    	};
    class Node
    {
    	static  const  int order=4;
    	int numitems;
    	Node *parent;
    	Node *childarray[order];
    	data *item[order-1];
    public:
    	Node(){}
    public:
    	void connect(int childnum,Node *child)
    	{
    		childarray[childnum]=child;
    		if(child!=NULL)
    			child->parent=this;
    		
    	}
    	//disconetc from this node,return it;
    	
    	Node *disconnectchild(int childnum)
    	{
    		Node *tempnode=childarray[childnum];
    		childarray[childnum]=NULL;
    			
    	 return  (tempnode);
    	}
    	Node *getchild(int childnum){
    		return childarray[childnum];
    }
    	Node *getparent()
    	{
    
    		return parent;
    	}
    	bool isleaf()
    	{
    		return (childarray[0]==NULL)?true:false;
    
    	}
    	int getnumitems()
    	{
    		return numitems;
    	}
    	data *getitem(int index)
    	{
    		return item[index];
    
    	}
    
    	bool isfull()
    	{
    
    		return (numitems==order-1);
    	}
    	int finditem(long key)
    	{
    		for(int j=0;j<order-1;j++)
    		{
    			if(item[j]==NULL)
    				break;
    			else if(item[j]->ddata==key)
    				 return j;
    
    
    
    
    		}
    		return -1;
    
    	}
    	int insertitem(data *newitem)
    	{
    		numitems++;
    		long newkey=newitem->ddata;
    		for(int j=order-2;j>=0;j--)
    		{
    			if(item[j]==NULL)
    				continue;
    			else
    			{
    				long itskey=item[j]->ddata;
    				if(newkey<itskey)
    					item[j+1]=item[j];
    				else
    				{
    					item[j+1]=newitem;
    					return j+1;
    					
    				}
    							}
    			
    		}
    		item[0]=newitem;
    		return 0;
    
    
    
    	}
    	data *removeitem()
    	{
    		data *temp=item[numitems-1];
    		item[numitems-1]=NULL;
    		numitems--;
    		return temp;
    
    
    	}
    	void displayNode()
    	{
    		for(int j=0;j<numitems;j++)
    			item[j]->display();
    		cout<<endl;
    
    	}
    
    };
    
    class tree234
    {
    	
        Node *root;
    public:
        tree234() : root(NULL) {}
    	void  displaytree()
    	{
    
    		recursivdisplay(root,0,0);
    
    	}
    	 void recursivdisplay(Node *thisnode,int level,int childnum)
    	 {
    		 thisnode->displayNode();
    		 int numitems=thisnode->getnumitems();
    		 for(int j=0;j<numitems+1;j++)
    		 {
    			 Node *nextnode=thisnode->getchild(j);
    			 if(nextnode!=NULL)
    				 recursivdisplay(nextnode,level+1,j);
    			 else
    				  return ;
    
    
    
    
    		 }
    
    
    
    
    
    	 }
    	Node *getnextchild(Node *theNode,long thevalue)
    	{
    		int j;
    		int numItems=theNode->getnumitems();
    		for(j=0;j<numItems;j++)
    		{
    
    			if(thevalue<theNode->getitem(j)->ddata)
    				return theNode->getchild(j);
    
    		}
    		return theNode->getchild(j);
    
    	}
    	  void split(Node * thisnode)
    	  {
    		  data *itemb,*itemc;
    		  Node *parent,*child2,*child3;
    		  int itemindex;
    		  itemc=thisnode->removeitem();
    		  itemb=thisnode->removeitem();
    		  child2=thisnode->disconnectchild(2);
    		  child3=thisnode->disconnectchild(3);
    		  Node *newright=new Node();
    		  if(thisnode==root)
    		  {
    			  root=new Node();
    			  parent=root;
    			  root->connect(0,thisnode);
    
    
    
    
    		  }
    		  else
    			  parent=thisnode->getparent();
    		  //deal with parent
    		  itemindex=parent->insertitem(itemb);
    		  int n=parent->getnumitems();
    		  for(int j=n-1;j>itemindex;j--)
    		  {
    			  Node *temp=parent->disconnectchild(j);
    			  parent->connect(j+1,temp);
    
    
    		  }
    
    		  parent->connect(itemindex+1,newright);
    		  //deal with newright
    		  newright->insertitem(itemc);
    		  newright->connect(0,child2);
    		  newright->connect(1,child3);
    
    	  }
    public:
    	 void insert(long dvalue)
    	 {
    		 Node *curnode=root;
    		 data *tempitem=new data(dvalue);
    		 while(true)
    		 {
    			 if(curnode->isfull())
    			 {
    
    				 split(curnode);
    				 curnode=curnode->getparent();
    
    				 curnode=getnextchild(curnode,dvalue);
    
    
    			 }
    			 else if(curnode->isleaf())
    				 break;
    			 else
    				 curnode=getnextchild(curnode,dvalue);
    			 
    		 }
    		 curnode->insertitem(tempitem);
    		 	 }
    public:
    	int find(long key)
    	{
    		Node *curnode=root;
    int childnum;
    while(true)
    {
    	if(childnum=curnode->finditem(key)!=-1)
    		return childnum;
    	else if(curnode->isleaf())
    		return -1;
    	else
    		curnode=getnextchild(curnode,key);
    }
    	}
    };
    
    char Getchar()
    {
    	char AB;
    	cin>>AB;
    	return  AB;
    }
    int main()
    {
    	int found;
    	long value;
    	tree234 *thetree=new tree234();
    	thetree->insert(50);
    	thetree->insert(40);
    	thetree->insert(60);
    	thetree->insert(30);
    	thetree->insert(70);
    	while(true)
    	{
    cout<<" enter   first letter "<<endl;
    cout<<" show ,insert or   find :  "<<endl;
    char choice=Getchar();
    switch(choice)
    {
    case 's':
    	cout<<" display tree ";
    	thetree->displaytree();
    	break;
    
    case 'i':
    	cout<<"  enter value to insert "<<endl;
    	cin>>value;
    	thetree->insert(value);
    	break;
    case 'f' :
    	cout<< "enter value to find ";
    	cin>>value;
    	 found=thetree->find(value);
    	if(found!=-1)
    		cout<<" found  =  "<<value<<endl;
    	
    	else
    	
    		cout<< " not found " <<value <<endl;
    	
    	break;
    default:
    	cout <<" invalid entry "<<endl;;
    	}
    
    
    	}
    	delete thetree;
    
    	return 0;
    }



i have used    debugger,step into,step over and so on,and get red marks on this lines
-		

    this	0x00000000 {numitems=??? parent=??? childarray=0x00000008 ...}	Node * const
    		numitems	CXX0030: Error: expression cannot be evaluated	
    		parent	CXX0030: Error: expression cannot be evaluated	
    -		childarray	0x00000008	Node * [4]
    		[0]	CXX0030: Error: expression cannot be evaluated	
    		[1]	CXX0030: Error: expression cannot be evaluated	
    		[2]	CXX0030: Error: expression cannot be evaluated	
    		[3]	CXX0030: Error: expression cannot be evaluated	
    -		item	0x00000018	data * [3]
    		[0]	CXX0017: Error: symbol "" not found	
    		[1]	CXX0030: Error: expression cannot be evaluated	
    		[2]	CXX0030: Error: expression cannot be evaluated	


starting point is this one
return (numitems==order-1) please help to understand what is problem?




tree234 class crashes
===

after fixing  error related with switch statment,i have following list of error,hen i used debugger(reason was that,problem is going to crashes when i run it)
code is again this one

    #include<iostream>
    #include<cstring>
    using namespace std;
    class data
    {
    public:
    	long ddata;
    	data(long dd)
    	{
    		ddata=dd;
    	}
    	void display()
    	{
    		cout<<ddata<<"  ";
    	}
    	};
    class Node
    {
    	static  const  int order=4;
    	int numitems;
    	Node *parent;
    	Node *childarray[order];
    	data *item[order-1];
    public:
    	Node(){}
    public:
    	void connect(int childnum,Node *child)
    	{
    		childarray[childnum]=child;
    		if(child!=NULL)
    			child->parent=this;
    		
    	}
    	//disconetc from this node,return it;
    	
    	Node *disconnectchild(int childnum)
    	{
    		Node *tempnode=childarray[childnum];
    		childarray[childnum]=NULL;
    			
    	 return  (tempnode);
    	}
    	Node *getchild(int childnum){
    		return childarray[childnum];
    }
    	Node *getparent()
    	{
    
    		return parent;
    	}
    	bool isleaf()
    	{
    		return (childarray[0]==NULL)?true:false;
    
    	}
    	int getnumitems()
    	{
    		return numitems;
    	}
    	data *getitem(int index)
    	{
    		return item[index];
    
    	}
    
    	bool isfull()
    	{
    
    		return (numitems==order-1);
    	}
    	int finditem(long key)
    	{
    		for(int j=0;j<order-1;j++)
    		{
    			if(item[j]==NULL)
    				break;
    			else if(item[j]->ddata==key)
    				 return j;
    
    
    
    
    		}
    		return -1;
    
    	}
    	int insertitem(data *newitem)
    	{
    		numitems++;
    		long newkey=newitem->ddata;
    		for(int j=order-2;j>=0;j--)
    		{
    			if(item[j]==NULL)
    				continue;
    			else
    			{
    				long itskey=item[j]->ddata;
    				if(newkey<itskey)
    					item[j+1]=item[j];
    				else
    				{
    					item[j+1]=newitem;
    					return j+1;
    					
    				}
    							}
    			
    		}
    		item[0]=newitem;
    		return 0;
    
    
    
    	}
    	data *removeitem()
    	{
    		data *temp=item[numitems-1];
    		item[numitems-1]=NULL;
    		numitems--;
    		return temp;
    
    
    	}
    	void displayNode()
    	{
    		for(int j=0;j<numitems;j++)
    			item[j]->display();
    		cout<<endl;
    
    	}
    
    };
    
    class tree234
    {
    	
        Node *root;
    public:
        tree234() : root(NULL) {}
    	void  displaytree()
    	{
    
    		recursivdisplay(root,0,0);
    
    	}
    	 void recursivdisplay(Node *thisnode,int level,int childnum)
    	 {
    		 thisnode->displayNode();
    		 int numitems=thisnode->getnumitems();
    		 for(int j=0;j<numitems+1;j++)
    		 {
    			 Node *nextnode=thisnode->getchild(j);
    			 if(nextnode!=NULL)
    				 recursivdisplay(nextnode,level+1,j);
    			 else
    				  return ;
    
    
    
    
    		 }
    
    
    
    
    
    	 }
    	Node *getnextchild(Node *theNode,long thevalue)
    	{
    		int j;
    		int numItems=theNode->getnumitems();
    		for(j=0;j<numItems;j++)
    		{
    
    			if(thevalue<theNode->getitem(j)->ddata)
    				return theNode->getchild(j);
    
    		}
    		return theNode->getchild(j);
    
    	}
    	  void split(Node * thisnode)
    	  {
    		  data *itemb,*itemc;
    		  Node *parent,*child2,*child3;
    		  int itemindex;
    		  itemc=thisnode->removeitem();
    		  itemb=thisnode->removeitem();
    		  child2=thisnode->disconnectchild(2);
    		  child3=thisnode->disconnectchild(3);
    		  Node *newright=new Node();
    		  if(thisnode==root)
    		  {
    			  root=new Node();
    			  parent=root;
    			  root->connect(0,thisnode);
    
    
    
    
    		  }
    		  else
    			  parent=thisnode->getparent();
    		  //deal with parent
    		  itemindex=parent->insertitem(itemb);
    		  int n=parent->getnumitems();
    		  for(int j=n-1;j>itemindex;j--)
    		  {
    			  Node *temp=parent->disconnectchild(j);
    			  parent->connect(j+1,temp);
    
    
    		  }
    
    		  parent->connect(itemindex+1,newright);
    		  //deal with newright
    		  newright->insertitem(itemc);
    		  newright->connect(0,child2);
    		  newright->connect(1,child3);
    
    	  }
    public:
    	 void insert(long dvalue)
    	 {
    		 Node *curnode=root;
    		 data *tempitem=new data(dvalue);
    		 while(true)
    		 {
    			 if(curnode->isfull())
    			 {
    
    				 split(curnode);
    				 curnode=curnode->getparent();
    
    				 curnode=getnextchild(curnode,dvalue);
    
    
    			 }
    			 else if(curnode->isleaf())
    				 break;
    			 else
    				 curnode=getnextchild(curnode,dvalue);
    			 
    		 }
    		 curnode->insertitem(tempitem);
    		 	 }
    public:
    	int find(long key)
    	{
    		Node *curnode=root;
    int childnum;
    while(true)
    {
    	if(childnum=curnode->finditem(key)!=-1)
    		return childnum;
    	else if(curnode->isleaf())
    		return -1;
    	else
    		curnode=getnextchild(curnode,key);
    }
    	}
    };
    
    char Getchar()
    {
    	char AB;
    	cin>>AB;
    	return  AB;
    }
    int main()
    {
    	int found;
    	long value;
    	tree234 *thetree=new tree234();
    	thetree->insert(50);
    	thetree->insert(40);
    	thetree->insert(60);
    	thetree->insert(30);
    	thetree->insert(70);
    	while(true)
    	{
    cout<<" enter   first letter "<<endl;
    cout<<" show ,insert or   find :  "<<endl;
    char choice=Getchar();
    switch(choice)
    {
    case 's':
    	cout<<" display tree ";
    	thetree->displaytree();
    	break;
    
    case 'i':
    	cout<<"  enter value to insert "<<endl;
    	cin>>value;
    	thetree->insert(value);
    	break;
    case 'f' :
    	cout<< "enter value to find ";
    	cin>>value;
    	 found=thetree->find(value);
    	if(found!=-1)
    		cout<<" found  =  "<<value<<endl;
    	
    	else
    	
    		cout<< " not found " <<value <<endl;
    	
    	break;
    default:
    	cout <<" invalid entry "<<endl;;
    	}
    
    
    	}
    	delete thetree;
    
    	return 0;
    }



i have used    debugger,step into,step over and so on,and get red marks on this lines
-		

    this	0x00000000 {numitems=??? parent=??? childarray=0x00000008 ...}	Node * const
    		numitems	CXX0030: Error: expression cannot be evaluated	
    		parent	CXX0030: Error: expression cannot be evaluated	
    -		childarray	0x00000008	Node * [4]
    		[0]	CXX0030: Error: expression cannot be evaluated	
    		[1]	CXX0030: Error: expression cannot be evaluated	
    		[2]	CXX0030: Error: expression cannot be evaluated	
    		[3]	CXX0030: Error: expression cannot be evaluated	
    -		item	0x00000018	data * [3]
    		[0]	CXX0017: Error: symbol "" not found	
    		[1]	CXX0030: Error: expression cannot be evaluated	
    		[2]	CXX0030: Error: expression cannot be evaluated	


starting point is this one
return (numitems==order-1) please help to understand what is problem?



