int i=0,j=0;
	char operand[30];
	char lbl[20],opr,num[20];
	while(i<30)
		lbl[i]=num[i]=operand[i++]=NULL;
	
	cin>>operand;

	for(i=0; operand[i]!='+' || operand[i]!='-'; i++)
		lbl[i]=operand[i];
	opr=operand[i++];
	while(operand[i]!=NULL)
		num[j++]=operand[i++];

..is there any mistake in this piece of code, my execution is getting stuck at

lbl[i]=operand[i];

>>operand!='+' || operand!='-';

Use && operator instead of ||. Read the statement aloud to yourself -- "do while operand not + and while operand not -.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.