it has some features to tease geeks like you
Which are?
this is useless crap indeed.
Usefulness is in the eye of the beholder. I for one, have
found some of the code there useful for learning purposes.
If others have found it useless, that doesn't change what
it's done for me.
my favorite was 'portable string class'
not of you business.
i like pointers,
Why? IMO they are one of the major sources of bugs.
there were here before stroustrup
decided
So you seem to be basing your claim of their superiority
over references upon their tenure. I find that to be
very poor logic. Abacuses have been around for thousands
of years. Are they superior to the modern digital computer?
to win battle with fortran
Perhaps you should read some of Stroustrup's writings (e.g.
his "Design and Evolution of C++") before you try to put words
into his mouth.
and introduced refs solely to
support
operations overloading
Repeat my last paragraph above.
(unfortunately this created good breed
environment
for people who tread ANSI C++ standard as bible).
I treat the C++ standard for what it is: the single authoritative
definition of the C++ language. I exploit the guarantees it
grants to me regarding my C++ programs, when translated by
implementations which adhere to it.
could you give me the list of compilers/platforms where is matters?
No need. I have the language standard to guarantee behavior
(if I follow the rules.) One such rule is that the 'std::string'
'find' functions report 'not found' with a value denoted by
the expression 'std::string::npos'. No other value is given
this guarantee, nor is there any guranteee of a particular
actual value for 'npos'.
could you imagine any other value than -1. think hard...
Any negative value, or any positive value outside the
range of 'std::string::size_type'.
....
int main()
{
string ss[] = {
" Hi my friend\t \n",
"",
" \t hi \n\t\r",
"HI ",
"SSSSSS",
" Bye"
};
Why use an array when you have the much safer and easier
to use containers, e.g. vector?
because i like everything unsafe and hard. this is my choice.
So be it. I'll add your name to my 'no-hire' list.
for (int i = 0; i < sizeof(ss) / sizeof(ss[0]); ++i) {
string s = ss;
string_strip(&s);
cerr << "'" << s << "'" << endl;
}
}
I very much doubt the above code would be accepted by a
site offering code snippets. It's got many problems.
it was accepted by usenet already without asking you.
Usenet is not a person which can make decisions or 'accept'
or 'reject' something. It's just a 'place'. A tree will
'accept' me shooting it with a shotgun, that doesn't stop
such an action from being detrimental to the tree.
could you be more specific?
Um, no I won't do your research for you. I've already pointed
out a promising place for you to look.
i just want the function which strips
spaces
out of my string.
And there are many which have already been posted to
Usenet (and the web) many times.
i don't need superior solution
Yet you claim to have created one, but have failed
to demonstrate its superiority.
of this apparently
'very
big' problem.
I don't find it a big problem at all. I've long ago solved
it, in many different languages.
Andrei
PS: if you are so cool with standard
I'm not, and never have claimed to be 'cool with standard'.
However I do possess a copy of the ISO standard for C++, and
refer to it when I need to know a conclusive answer to a
question about C++.
can you tell me what virse 2 of
12.1.5
said.
That one's easy. It doesn't say anything, because it does not exist.
you've got thirty seconds,
I'll take as much time as I need, thank you, until such time
as you're paying me to do things for you.
otherwise you are not cool.
My goal is not and never has been to be 'cool'.
Always has been, always will. So what?
OK, so you're 'cool'. I'm productive. That's the way I like it.
-Mike