Thanks kids for the prompt response, it was a welcoming surprise when I cam 
in this morning.
You are absolutely right, I am using MinGW-64's g++ compiler.
And about the second observation, the #if* are with in the main(). The 
checking is done this way so to let some  of the program run, you know, data 
acquisitions such app settings, etc. (that way the client thinks that the 
app has done an extensive analysis of the problem before displaying the 
error). In fact the error message is displayed by an exception handling 
class object in GUI format, so there is no need for the #error preprocessor. 
Yes, yes, I know, this is kind of strange.
OK, going back to the main problem... is my understanding of the problem, as 
I expressed it in the OP, correct or have I gone bananas!!?
By the way, I have not tested the code in the 32bit version of MinGW's g++ 
and I am using Win7-64bit platform.

Have a great day kids, and if I don’t hear from you today I hope that you'll 
have a wonderful weekend.

----
PD: I want to add a deep and profound message as the foot note in my emails, 
anyone knows where to get ideas from?

-----Original Message----- 
From: Ozkan Sezer
Sent: Friday, September 06, 2013 1:50 AM
To: mingw-w64-public
Subject: Re: [Mingw-w64-public] #ifndef or #ifdef, that is the dilemma

> Am 05.09.2013 23:10 schrieb "Incongruous" <[email protected]>:
>>
>> #ifndef __cpluplus
>>    std::cout << "error\n A C++ compiler is required!" << std::endl;
>>    return -1;
>> #endif
>> The above snip says, if __cplusplus has not been defined print  “bla bla”
>> and return –1. Which means that if I am using __cplusplus it should NOT
>> print anthing, right? So, am I using the C or the C++ compiler? I am 
>> really
>> confused.
>

You are doing a compile-time check by #ifndef __cplusplus, but you are
using a runtime message print (which you are doing in C++ ways, btw)..
If your purpose is to determine whether you are using a C++ compiler,
you should do something like:
#ifndef __cplusplus
#error  A C++ compiler is required!
#endif

--
O.S.

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public 


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to