Subj : Re: subset function for string in c++ To : comp.programming From : Randy Howard Date : Wed Sep 28 2005 11:48 pm puzzlecracker wrote (in article <1127944988.539899.110860@g43g2000cwa.googlegroups.com>): >> >> 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) .