Re: subset function for string in c++
- From: Randy Howard <randyhoward@xxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Sep 2005 22:48:21 GMT
puzzlecracker wrote
(in article
<1127944988.539899.110860@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>):
>>
>> Wow. Ben's version sure seems a lot clearer. :-)
>>
>> I'm having pascal flashbacks, make it stop.
>>
>> --
> All above is NOT- again NOT NOT NOT NOT C++...
Duh. I don't recall anyone claiming it was. I think the "an
implementation in Oberon" part clued most of us in to that fact
immediately, if not for the code that followed.
> the c++ way is - are you all still with me
No, not really.
> // give some values to a and b...like
>
> a="why cannot I still write c++ code";
Nice grammar. :-)
> b="c++ code";
>
> a.find_first_not_of(b);
Nice try. Too bad the OP's question was to find out whether or
not characters in a are a subset of b. The above fails that for
several reasons. First of all, you have the contents of a and b
backwards. Secondly, this gets the index of the first character
that doesn't match, not a boolean answer, at least as written.
> That is what we call sleek C++ code in the UNITED STATES OF AMERICA!
It is? I didn't realize that "sleek" meant "fails to meet
program objectives".
> Now, re-read it 100 times and admit that above posts are flawed,
> erronous, completely bizzare and ultimately useless.
Your post was in fact flawed, erroneous (note the spelling),
somewhat bizarre, and ultimately probably not worth responding
to here.
--
Randy Howard (2reply remove FOOBAR)
.
- References:
- Re: subset function for string in c++
- From: August Karlstrom
- Re: subset function for string in c++
- From: Randy Howard
- Re: subset function for string in c++
- From: puzzlecracker
- Re: subset function for string in c++
- Prev by Date: Re: subset function for string in c++
- Next by Date: Re: subset function for string in c++
- Previous by thread: Re: subset function for string in c++
- Next by thread: Re: subset function for string in c++
- Index(es):
Relevant Pages
|