Well, the most obvious thing I see is that your str variable needs to be an array. There may be some other errors that I didn't catch at first glance, though, and if there are, let us know.
Edit: Ahh. Just found another one. Your if statement is incorrect. If you want to test for the word door, you need to do it like this:
if(strcmp(str, "door") == 0)
{
// code
}
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Last edited by Mjordan2nd; Feb 24th, 2005 at 8:56 PM.
|