Re: Programs with if statements not working

From: Chris \( Val \) (
Date: 01/06/04

Date: Tue, 6 Jan 2004 23:47:50 +1100

"Ken" <> wrote in message


| Thanks, Chris and Russell for your replies. Chris, your advice worked
| very nicely, although the compiler issued a warning.
| I am very new to programming in C++ and I interpreted your advice
| "include the header <climits> to use 'INT_MAX' " and did the
| following:
| #include <iostream> <climits>
| and got this warning - [Warning] extra tokens at end of #include
| directive.
| I don't know what that means. Did I do it incorrectly?

No, not quite :-).

Put then on an separate line as follows:

#include <iostream>
#include <climits>

| Another question on something in your reply;
| "PS: You can always run your program executable directly from
| the command line, where you will see the expected output."
| I don't know what that means, would you explain further.
| I am using Dev-C++ on a Pentium IV running Windows XP.

What I meant by that was, when you compile and build your
program, an executable is produced.

Once you have the executable, open up an command prompt
window from your start menu, and type in the following,
substituting the relevant details:


That should run your program executable for you to
view it's output.

Chris Val

Relevant Pages

  • Re: Error 8007000B
    ... hi chris thanks for trying to help but no joy still cant download alos just ... "Chris G" wrote: ... By now 'Command Prompt' should be appearing inyour recently used programme ... If it is windows vista and you are seeing this error when trying to install ...
  • Re: Dropped Mapped Connections....
    ... >>>login with using the exact same login and it never looses the mapped ... >> mapped resource, it was because I lost the actual network connection, ... >will appear but if from a command prompt I type "S" it will not find the ...
  • Re: problem with KB867801
    ... Another option is to try Safe Mode with command prompt. ... Chris Barber wrote: ... Also McAffee Subscription Error A component needed to run is not present, ...
  • Re: Windows Update Manual Doesnt Work
    ... Please open a Command Prompt from Start> Run> type in ... Chris B wrote: ... Microsoft Online Assisted Support (no-cost for Windows Update ...
  • Re: Command Prompt Wont Launch
    ... Michael Ortega "Chris" wrote in message ... > When I try to run the command prompt I get the following error:> ... > I also get this error when windows update tries to run the service pack 2> installation. ... The error says that it cannot access ftp.exe because I don't> have the appropriate permissions. ...