if problem
From: NONE (freddyb_at_adelphia.net)
Date: 02/10/04
- Previous message: Jeff Schwab: "Re: Writing better programs?"
- Next in thread: Josh Sebastian: "Re: if problem"
- Reply: Josh Sebastian: "Re: if problem"
- Reply: Kelsey Bjarnason: "Re: if problem"
- Reply: NONE: "Re: if problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 09 Feb 2004 18:17:04 -0500
Why is it this if statement always goes to the else segment? As you
can see I have it so that the else portion outputs what is in command,
so if it does not have what I think it should I am aware. I have code
prior to this that does put "666" in command, and when the else
statement runs it tells me that is what is in command. Why is it that
the else still runs instead of the if??
if(command == "666")
{
cout << "shutting down!\n";
system("pause");
shutdown();
}else{
cout << endl << "Command is " << command << endl;
cout << "Did not receive shutdown command.\n";
system("pause");
} // End if/else statement
- Previous message: Jeff Schwab: "Re: Writing better programs?"
- Next in thread: Josh Sebastian: "Re: if problem"
- Reply: Josh Sebastian: "Re: if problem"
- Reply: Kelsey Bjarnason: "Re: if problem"
- Reply: NONE: "Re: if problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|