Re: [Dev-C++] "Windows" vs. "Console"
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Mats L. <mat...@to...> - 2004-02-29 11:58:35
|
You have program type settings under project options (Project / Project
Options / tab: General) You can select GUI, console, static lib or DLL
there. The other thing that pops up in my mind is that your DevCpp is
actually compiled for Windows so it has to be different from the Unix one.
The naming of those variables in the book wasn't very clever. I always name
my variables starting with something like "ml_" (my initials) or something
like that to avoid redeclarations. Do a global search and replace and change
LP to TCPL_LP :)
/M
From: "Kenneth P. Ruppel" <kpr...@op...>
> I have been working through Stroustrup's "The C++ Programming Language"
> Special Edition. I have run into a problemcompiling a program that
> Stroustrup says compiles and runs on his system, which I believe is a
> Unix system.
>
> The code (p.109) that doesn't compile is the following:
>
> #include <iostream>
> #include <string>
> #include <map>
> #include <cctype>
> using namespace std;
>
> // ENUM p.109
> enum Token_value{
> NAME, NUMBER, END,
> PLUS='+', MINUS='-=', MUL='*=', DIV='/',
> PRINT=';', ASSIGN='=', LP='(', RP=')'
>
> The error I get is the following:
>
> 'LP' redeclared as different kind of symbol
>
> This error comes from a statement in winnt.h, which is not included.
>
> The problem is, I have been to the C++ Learning newsgroup, and after
> letting them see that winnt.h is not included, etc., etc., they have
> left me with "there must be a switch in your application/IDE
> configuration that is trying to write a Windows program. You need to
> select configuration switches that produce a 'console' program in
> Windows or a DOS program."
>
> I am using Bloodshed 4.9.8.7, and I have never had to change the config
> to compile and run other programs that come up in a DOS window. And I
> have never changed the options in "Compiler Options". And also, the
> options that indicate trying to support C constructs, I selected "No",
> since I am trying to un-confuse myself and learn C++ only.
>
> Does anybody have any ideas why this error from winnt.h is appearing.
|