Re: How to make c++ realize empty character constant ''?

2013-12-14 Thread Juhász Ádám
Oh dear. Just as I went around to do some research, I've realised that what I'm actually talking about is ‘cc’ and not ‘cpp’, just mixed them up. (I couldn't understand, why we couldn't agree.) For quite while I use makefiles instead of the actual command and so this could easily slip my mind.

Re: How to make c++ realize empty character constant ''?

2013-12-14 Thread Brandon Allbery
On Sat, Dec 14, 2013 at 6:21 AM, Juhász Ádám jad...@gmail.com wrote: But cpp still a C pre-compiler and we all can agree, that it is needed for MacPorts, otherwise neither cc nor c++ would work properly, right? It is included in both gcc and clang, and also included with Apple's clang. It

Re: How to make c++ realize empty character constant ''?

2013-12-13 Thread Juhász Ádám
The *GNU's* C++ compiler name is g++. Clang's C++ compiler name is clang++ for example. (Microsoft Visual C++'s compiler name is lc.exe.) ‘c++’ usually a symlink on the compiler the system primarly built with. (or something like that.) the cpp (as a command) usually used to compile C codes, and

Re: How to make c++ realize empty character constant ''?

2013-12-13 Thread Brandon Allbery
On Fri, Dec 13, 2013 at 5:36 AM, Juhász Ádám jad...@gmail.com wrote: However, the GNU compiler is also capable to select the proper language and use the proper tools for compillation, so GNU's cpp will compile… I believe Fortran, or even Java, if the proper alternative GNU compiler present.

Re: How to make c++ realize empty character constant ''?

2013-12-13 Thread Davor Cubranic
On Dec 13, 2013, at 2:36 AM, Juhász Ádám jad...@gmail.com wrote: the cpp (as a command) usually used to compile C codes, and it is heavily used by MacPorts (where the program was written in C) since MacPorts compiles the ports from source right there, on your Mac. One could use c++ (or g++)

Re: How to make c++ realize empty character constant ''?

2013-12-13 Thread Brandon Allbery
On Fri, Dec 13, 2013 at 5:36 AM, Juhász Ádám jad...@gmail.com wrote: However, the GNU compiler is also capable to select the proper language and use the proper tools for compillation, so GNU's cpp will compile… I believe Fortran, or even Java, if the proper alternative GNU compiler present.

Re: How to make c++ realize empty character constant ''?

2013-12-09 Thread Chris Jones
If you're trying to make a C/C++ string, perhaps you want '\0'. But I can't tell what language you are working with or what exactly you are trying to accomplish. The code that was posted by the OP sure isn't C++... Been a while since I used it, but looks like fortran to me..

Re: How to make c++ realize empty character constant ''?

2013-12-09 Thread Jean Gobin
It seems to me you are trying to assign a character value to a string. A character is a single 8-bit (or 9 or 10 or 16 or 32 ...) value. A string is a series of characters, terminated or not. Assuming you have the proper classes, you overloaded what needs to be, at best your assignment should

Re: How to make c++ realize empty character constant ''?

2013-12-09 Thread Brandon Allbery
On Sun, Dec 8, 2013 at 1:35 PM, Gmail yangz...@gmail.com wrote: I am trying to compile the following statements using CPP. This is a (formerly common) abuse of CPP and nobody can guarantee the result. I *very strongly* recommend you contact whoever provided whatever it is you are working with

Re: How to make c++ realize empty character constant ''?

2013-12-09 Thread Gmail
Hi Chris Yes, it is fortran code. I am not sure why it uses CPP to compile it. From the compilation statement, Fortran code is converted to .b file and then to compile it. I am not sure why. On Dec 9, 2013, at 3:51 AM, Chris Jones jon...@hep.phy.cam.ac.uk wrote: If you're trying to make a

Re: How to make c++ realize empty character constant ''?

2013-12-08 Thread Brandon Allbery
On Sun, Dec 8, 2013 at 1:35 PM, Gmail yangz...@gmail.com wrote: Does anyone know how to make cpp can compile empty character constant? There is no such thing. What would it mean? If you're trying to make a C/C++ string, perhaps you want '\0'. But I can't tell what language you are working