{gberanek}@tennis.fnal.gov <104> ./a.out
./a.out
+ ./a.out
Linux tennis.fnal.gov 2.0.36 Wed May 26 09:48:23 CDT 1999
i = 5, i++ = 4
i = 6, ++i = 6
but, says George, if you split up the lines you get:
i = 4, i++ = 4
i = 5, ++i = 6
---------------------------------------------------------------------------
{gberanek}@tennis.fnal.gov <105> cat test.c
#include <iostream.h>
int main() {
cout << "Linux tennis.fnal.gov 2.0.36 Wed May 26 09:48:23 CDT 1999" <<
endl;
int i=4;
cout << "i = " << i << ", i++ = " << i++ << endl;
cout << "i = " << i << ", ++i = " << ++i << endl;
cout << "but, says George, if you split up the lines you get:" << endl;
i=4;
cout << "i = ";
cout << i;
cout << ", i++ = ";
cout << i++;
cout << endl;
cout << "i = ";
cout << i;
cout << ", ++i = ";
cout << ++i;
cout << endl;
cout << "just like Sun or Alpha";
return 0;
}
On Wed, 26 May 1999 yocum@fnal.gov wrote:
> Date: Wed, 26 May 1999 14:22:12 -0500
> From: yocum@fnal.gov
> To: linux-users@fnal.gov
> Cc: yocum@fnal.gov
> Subject: Forw: Another C++ issue
>
>
> Can anyone verify this behavior? Is this a problem that others are
> experiencing? (below)
>
>
> Thanks,
> Dan
>
> ___________________________________________________________________________
> Dan Yocum | Phone: (630) 840-8525
> Linux/Unix System Administrator | Fax: (630) 840-6345
> Computing Division OSS/FSS | email: yocum@fnal.gov .~. L
> Fermi National Accelerator Lab | WWW: www-oss.fnal.gov/~yocum/ /V\ I
> P.O. Box 500 | // \\ N
> Batavia, IL 60510 | "TANSTAAFL" /( )\ U
> ________________________________|_________________________________ ^`~'^__X_
>
>
> ------- Forwarded Message
>
> Return-Path: STUART@axcdfl.fnal.gov
> Received: from FNAL.FNAL.Gov (fnal.fnal.gov [131.225.9.8])
> by sapphire.fnal.gov (8.8.7/8.8.7) with ESMTP id NAA17642
> for <yocum@sapphire.fnal.gov>; Wed, 26 May 1999 13:34:33 -0500
> Received: from axcdfl.fnal.gov ("port 1189"@axcdfl.fnal.gov)
> by FNAL.FNAL.GOV (PMDF V5.1-12 #3998)
> with SMTP id <01JBNL7Y51MG000D6X@FNAL.FNAL.GOV> for yocum@sapphire.fnal.gov;
> Wed, 26 May 1999 13:34:32 -0500 CDT
> Date: Wed, 26 May 1999 13:34:31 -0500
> From: "David D. Stuart (630) 840-3072" <STUART@AXCDFE.fnal.gov>
> Subject: Fermi 5.2
> To: YOCUM@fnal.gov
> Cc: STUART@AXCDFE.fnal.gov
> Message-id: <990526133431.26c00936@AXCDFE.fnal.gov>
>
>
> Dan Yocum,
>
> I was just upgraded from Fermi 5.0 to 5.2 (on node ncdf17). Now, I get compiler
> complaints (g++) on code which compiled fine previously. The first (and perhaps
> root cause) error is that the remove function is not defined for the string
> class (in STL). I browsed the include files and indeed could not find it.
>
> The following code
>
> /////////////////////////////////////////
> #include <stdio.h>
> #include <stdlib.h>
> #include <string>
>
> main()
> {
> string it;
>
> it = "This is a test";
> it.remove(1,3);
> }
> /////////////////////////////////////////
>
> gives a compiler error:
> try.cc:16: no matching function for call to `string::remove (int, int)'
>
> So, it appears to me that something about g++ did not get updated correctly.
> To check for an update problem, I tried the same thing on a separate machine
> which had 5.2 installed from scratch. The result is the same.
>
> Could you please check if g++ is complete in 5.2 and/or tell me how to get it
> installed correctly?
>
> Thanks.
>
> - - David Stuart
>
> ------- End of Forwarded Message
>
>
>
--x========================================x==================================x | WORK: | NOT WORK: o | | George Beranek | George Beranek /\O/ O | | CD-OPERATING SYSTEM SUPPORT CDS | P.O. Box 163 0 \ | 0-# | | Fermi National Accelerator Laboratory | Berwyn, IL 60402 // | / \| | P.O. Box 500 | ---------------| | M/S: 369 Loc: FCC 2 232A | | | Batavia, Illinois 60510-0500 | | | | | | Voice: (630) 840-4858 | Voice: (630) 323-1169 | | Fax: (630) 840-6345 | Fax: (708) 788-5337 | | Pager: (630) 266-0288 | Cell/V-mail: (708) 702-6119 | | E-Mail: gberanek@fnal.gov )| E-Mail: gberanek@CompuServe.com | | URL: http://tennis.fnal.gov/gberanek ( | URL: http://ourworld.compuserve.| | _ _____________ )| com/homepages/gberanek | x======================[_[_____________#=x==================================x