TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: FRANK MASINGILL
from: TIM HUTZLER
date: 1998-02-15 18:37:00
subject: Re: Boolean logic

-=>Quoting Frank Masingill to All <=-
FM>Something's obviously wrong with the program below.  You
FM>programmers can, I'm sure figure what I'm trying to learn.  Will you
FM>straighten it up for me? Thanks.
FM>#include 
FM>#include 
FM>int main()
FM>{
FM>clrscr();
FM>int IWantTo, IDontWantTo;
FM>IWantTo = 0; IDontWantTo = 1;
FM>cout << IDontWantTo << endl;
FM>if(IWantTo)
FM>{
FM>cout << IWantTo << endl;
FM>return IWantTo;
FM>}
FM>else
FM>if(IDontWantTo)
FM>{
FM>cout << IDontWantTo << endl;
FM>return IDontWantTo;
FM>}
FM>}
Missing a bracket "{" after the else and a "}" to close the block,
ie. three at the end.
FM>Sincerely,
FM>Frank
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 530-893-8079 * (1:119/88)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.