This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Request for feature


Mike Stump wrote:

> #include <string>
> #include <stdio.h>
>
> main() {
>        string a = "hhh";
>        string b = "yyyy";
>        string r;
>        r=a+b;
>        r+=a;
>        puts(r.c_str());
> }

My kung-fu is better than your kung-fu:

#include <string>
#include <cstdio>

main() {
       string a = "hhh";
       string b = "yyyy";
       string r;
       r=a+b;
       r+=a;
       puts(r.c_str());
}



Dima


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]