shell in c++

Jan 4, 2013 at 10:08pm
Hi for everyone from Poland.

At a begin sorry about my poor english because this is not my native language. (As you can see. :P)

I have a small issue with shell writting in C++:

1
2
3
4
 if
       (strcmp( command, "quit" ) && strcmp( command, "exit" ) == 0 )
	{
	  return 0; 


Why only second command can close running shell??
Jan 4, 2013 at 10:20pm
(strcmp( command, "quit" ) == 0 || strcmp( command, "exit" ) == 0 )

Try this?
Last edited on Jan 4, 2013 at 10:20pm
Jan 5, 2013 at 7:04am
Thank you. Now I see difference.
Topic archived. No new replies allowed.