Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

passing reference to pointer

1 view
Skip to first unread message

softdeveloper007

unread,
Feb 15, 2009, 3:09:43 AM2/15/09
to
Hi,

I am stuck here and need some inputs. To cut it short and simple:

void func1( )
{
int* p1, p2;
....

func2 (p1, p2);
...

}

void func2 (int*& pt1, int*& pt2)
{

}

I got: "error LNK2001: unresolved external symbol...fatal error
LNK1120: 1 unresolved externals"

but problem is gone by simply changing it to ptr to ptr:

void func1( )
{
int* p1, p2;
....

func2 (&p1, &p2);
...

}

void func2 (int** pt1, int** pt2)
{

}

compiler: visual studio6.0.

Any pointer, please? thanks!

Chris M. Thomasson

unread,
Feb 15, 2009, 3:22:08 AM2/15/09
to
"softdeveloper007" <softdeve...@gmail.com> wrote in message
news:3990c8ba-577e-4df8...@w24g2000prd.googlegroups.com...

> Hi,
>
> I am stuck here and need some inputs. To cut it short and simple:
>
> [...]

>
> but problem is gone by simply changing it to ptr to ptr:
>
> void func1( )
> {
> int* p1, p2;
> ....
>
> func2 (&p1, &p2);
> ...
>
> }
>
> void func2 (int** pt1, int** pt2)
> {
>
> }
>
> compiler: visual studio6.0.
>
> Any pointer, please? thanks!


Your initial code was in C++. BTW, `p2' is not a pointer to an `int', it is
an `int'... Change the line to:

int *p1, *p2;


Or, IMVHO:


int* p1;
int* p2;


WANG Cong

unread,
Feb 15, 2009, 3:23:59 AM2/15/09
to
softdeveloper007 wrote:

> Hi,
>
> I am stuck here and need some inputs. To cut it short and simple:
>
> void func1( )
> {
> int* p1, p2;

Probably you want:

int *p1, *p2;

> ....
>
> func2 (p1, p2);
> ...
>
> }
>
> void func2 (int*& pt1, int*& pt2)
> {
>
> }

C doesn't have references, try comp.lang.c++.


Jens Thoms Toerring

unread,
Feb 15, 2009, 3:24:23 AM2/15/09
to
softdeveloper007 <softdeve...@gmail.com> wrote:
> I am stuck here and need some inputs. To cut it short and simple:

> void func1( )
> {
> int* p1, p2;
> ....
> func2 (p1, p2);
> ...
> }

> void func2 (int*& pt1, int*& pt2)
> {
> }

> I got: "error LNK2001: unresolved external symbol...fatal error
> LNK1120: 1 unresolved externals"

> but problem is gone by simply changing it to ptr to ptr:

> void func1( )
> {
> int* p1, p2;

I guess you meant

int *p1, *p2;

otherwise the second variable won't be a pointer but a simple
int.

> ....
> func2 (&p1, &p2);
> ...
> }

> void func2 (int** pt1, int** pt2)
> {
> }

> Any pointer, please? thanks!

There are no "references" in C, you must be getting this
mixed up with C++. Thus the first version won't compile
with a C compiler while the second does. If you actually
want to use C++ you must use a C++ compiler or, if your
compiler does both, invoke it in C++ mode (many of those
decide what to use according to the file extension, try
e.g. '.cpp' or a '.C' instead of '.c'). But then you
also will be better served when asking in comp.lang.c++
instead;-)
Regards, Jens
--
\ Jens Thoms Toerring ___ j...@toerring.de
\__________________________ http://toerring.de

Chris M. Thomasson

unread,
Feb 15, 2009, 3:27:52 AM2/15/09
to
"Chris M. Thomasson" <n...@spam.invalid> wrote in message
news:cgQll.3096$i42...@newsfe17.iad...

> "softdeveloper007" <softdeve...@gmail.com> wrote in message
> news:3990c8ba-577e-4df8...@w24g2000prd.googlegroups.com...
>> Hi,
>>
>> I am stuck here and need some inputs. To cut it short and simple:
>>
>> [...]
>>
>> but problem is gone by simply changing it to ptr to ptr:
>>
>> void func1( )
>> {
>> int* p1, p2;
>> ....
>>
>> func2 (&p1, &p2);
>> ...
>>
>> }
>>
>> void func2 (int** pt1, int** pt2)
>> {
>>
>> }
>>
>> compiler: visual studio6.0.
>>
>> Any pointer, please? thanks!
>
>
> Your initial code was in C++.

> [...]


You also need to declare or define `func2()' before `func1()' or else the
compiler will think `func2()' is an external function returning an `int';
not good.
______________________________________________________
/* void func2(int**, int**); */


void func1()
{
int* p1;
int* p2;
func2(&p1, &p2);
}


void func2(int** pt1, int** pt2)
{

}


int main(void) {
func1();
return 0;
}

______________________________________________________


Un-comment the declaration, and you should see no warnings and/or errors.

Martin Ambuhl

unread,
Feb 15, 2009, 4:31:05 AM2/15/09
to
softdeveloper007 wrote:

> I am stuck here and need some inputs. To cut it short and simple:

You may be confused about either what language you are using or what
newsgroup you have posted to.

This newsgroup is for the C programming language. The constructs you
are using are syntax errors in that language. The extremely ugly form
of "int *& pt1" belongs to a (at least) the different programming
language C++. In either language the use of a function returning other
than an int without a prior declaration is a serious error. It is more
serious in C after 1999 or in C++, since neither has even the implicit
int declaration that C89 had.

softdeveloper007

unread,
Feb 15, 2009, 7:37:10 PM2/15/09
to
guys, thanks for all your inputs.

first of all, i'd like to apologize for the typo of missing * ahead of
p2 declaration that causes confusion.

i tried to make it as simple as possible. the original problem was
bubble-sorting the linked list by passing two pointers to nodes to a
swapping function.

it seems to me that, in order to properly step in the original
pointers thru the list, the two pointers should be passed by value
instead of reference to pointers,in other words, the pointers in the
caller would remain pointing to the same memory location, and not be
affected by swapping function, sounds right, right?

but it seemed, the pace that the pointer walks in the caller is
affected by the swapping function and thus steps in 2 steps (instead
of 1) each time due to some reason.

i knew simply swapping the value instead of re-arranging the nodes
would be a much simpler way but that's not my choice here due to other
restrictions.

thanks.

Ian Collins

unread,
Feb 15, 2009, 7:46:30 PM2/15/09
to
softdeveloper007 wrote:
> guys, thanks for all your inputs.

In future, please don't multi-post. You asked this question on at least
three groups. If a question is appropriate for more than one group
(which is rare), cross-post.

--
Ian Collins

softdeveloper007

unread,
Feb 15, 2009, 10:25:00 PM2/15/09
to
in addition to this C group, i also posted it on two other C++ groups.
with due respect, as long as it fits, i don't see the reason why not,
saving valuable resources for posts like "bikini babes"?

Ian Collins

unread,
Feb 15, 2009, 10:46:18 PM2/15/09
to
softdeveloper007 wrote:

Please don't top-post!

> On Feb 15, 4:46 pm, Ian Collins <ian-n...@hotmail.com> wrote:
>> softdeveloper007 wrote:
>>> guys, thanks for all your inputs.
>> In future, please don't multi-post. You asked this question on at least
>> three groups. If a question is appropriate for more than one group
>> (which is rare), cross-post.

> in addition to this C group, i also posted it on two other C++ groups.
> with due respect, as long as it fits, i don't see the reason why not,
> saving valuable resources for posts like "bikini babes"?
>

My point was you should cross-post. Otherwise people on one group waste
their time answering what has already been answered elsewhere.

--
Ian Collins

Dik T. Winter

unread,
Feb 15, 2009, 10:42:17 PM2/15/09
to
In article <3ea25a7b-09f2-4e3d...@y38g2000prg.googlegroups.com> softdeveloper007 <softdeve...@gmail.com> writes:
>
> On Feb 15, 4:46 pm, Ian Collins <ian-n...@hotmail.com> wrote:
> > softdeveloper007 wrote:
> > > guys, thanks for all your inputs.
> >
> > In future, please don't multi-post. You asked this question on at least
> > three groups. If a question is appropriate for more than one group
> > (which is rare), cross-post.
>
> in addition to this C group, i also posted it on two other C++ groups.
> with due respect, as long as it fits, i don't see the reason why not,
> saving valuable resources for posts like "bikini babes"?

You do not understand what cross-posting is?
--
dik t. winter, cwi, science park 123, 1098 xg amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/

Golden California Girls

unread,
Feb 15, 2009, 11:49:44 PM2/15/09
to
Dik T. Winter wrote:
> In article <3ea25a7b-09f2-4e3d...@y38g2000prg.googlegroups.com> softdeveloper007 <softdeve...@gmail.com> writes:
> >
> > On Feb 15, 4:46 pm, Ian Collins <ian-n...@hotmail.com> wrote:
> > > softdeveloper007 wrote:
> > > > guys, thanks for all your inputs.
> > >
> > > In future, please don't multi-post. You asked this question on at least
> > > three groups. If a question is appropriate for more than one group
> > > (which is rare), cross-post.
> >
> > in addition to this C group, i also posted it on two other C++ groups.
> > with due respect, as long as it fits, i don't see the reason why not,
> > saving valuable resources for posts like "bikini babes"?
>
> You do not understand what cross-posting is?

I'm not sure you do! I believe he is multi-posting and that is much worse than
cross posting.

softdeveloper007

unread,
Feb 16, 2009, 12:45:54 AM2/16/09
to
multi-posting? by the name, i guess i was, what's "so much worse"
about it as long as it fits the topic? in light of the fact that not
everyone is multi-subscriber.:-)...always good to learn. :-)


On Feb 15, 8:49 pm, Golden California Girls <gldncag...@aol.com.mil>
wrote:
> Dik T. Winter wrote:

Nate Eldredge

unread,
Feb 16, 2009, 1:03:48 AM2/16/09
to
softdeveloper007 <softdeve...@gmail.com> writes:

> multi-posting? by the name, i guess i was, what's "so much worse"
> about it as long as it fits the topic? in light of the fact that not
> everyone is multi-subscriber.:-)...always good to learn. :-)

Multi-posting means posting separate messages to different groups with
the same content. Cross-posting is posting the same message to multiple
different groups all at once, by listing them together in the
"Newsgroups:" header.

When you cross-post, people who read more than one of the target groups
will ordinarily see your message just once, rather than several
different times (which forces them to wonder if it's really the same
message, or a slightly different one). It also merges all the
discussions together; multi-posting tends to lead to multiple
independent and redundant discussions.

That said, the best course of action is still to post to the single
group whose topic is the best fit. That's the most courteous thing to
do: it targets your message to those who are the most interested and
doesn't waste the time of those who are less interested. Cross-posting
is only appropriate when your post has serious relevance to several
groups and you don't think any one of them would include a broad enough
audience to address all its issues. And multi-posting is never
appropriate.

softdeveloper007

unread,
Feb 16, 2009, 1:28:39 AM2/16/09
to
On Feb 15, 10:03 pm, Nate Eldredge <n...@vulcan.lan> wrote:

now it's getting clearer....but still not crystal...
just signed up in a rush and didn't have chance to figure out how to
and how not to.
the topics in my post covers call by reference, reference to pointer,
linked list...which would be considered "appropriate" for both C, C++
and even data structure groups if there are any. on one hand, one
would like to have maximum possible exposure of his or her post for
those who are interested from info-sharing perspective, on the other
hand, courtesy and etiquette are necessary for not to "force" those
who read it multiple times just to figure out the nuanced details if
any.
seems cross-posting is the way, but haven't figured out how to


"listing them together in the
"Newsgroups:" header".

but anyway, thanks for clarifying.

softdeveloper007

unread,
Feb 16, 2009, 1:55:47 AM2/16/09
to
On Feb 15, 10:28 pm, softdeveloper007 <softdeveloper...@gmail.com>
wrote:

that being said, unless you have posts like "bikini babes" you know
everyone would be interested across-group (no blame for multi-posting
on that:-)), cross-posting is always a better choice than "multi-
posting" (nah!:-))

Han from China

unread,
Feb 16, 2009, 2:00:26 AM2/16/09
to
softdeveloper007 wrote:
> in addition to this C group, i also posted it on two other C++ groups.
> with due respect, as long as it fits, i don't see the reason why not,

Don't worry about it. Some people substitute control of Usenet for
control of their lives. Do you honestly think anyone living a happy
life would give a damn whether someone multi-posts on Usenet? ;-) I
mean, picture it: A guy has financial security, is in great shape,
has a passionate relationship, owns a cute pet or two, and yet
has a neurotic reaction when you violate some Holy Usenet Rule -- not
going to happen in the real world.

In this case, multi-posting had the advantage over cross-posting that
we wouldn't have to watch the usual lame bickering between the Net
Nannies on this group and the Net Nannies on the others.


Yours,
Han from China

--
"Only entropy comes easy." -- Anton Chekhov

Richard Heathfield

unread,
Feb 16, 2009, 2:07:54 AM2/16/09
to
softdeveloper007 said:

<snip>

> just signed up in a rush and didn't have chance to figure out how
> to and how not to.

Your best course of action, at this point, is to spend six months
reading every article in the newsgroups to which you have
subscribed (without posting any further articles). Why? Because
newsgroups - like any other communities - have a culture, and each
newsgroup's culture is slightly different, and it's good manners to
take notice of a community's culture when seeking to become a part
of that community. After six months or so of diligent reading of
every article posted in that group, you'll be sufficiently aware of
the community's customs that you can begin to post without fear of
ignorantly offending people. You will also have begun the process
of separating the truth-tellers from the liars, the trolls from the
non-trolls, and the knowledgeable from the ignorant, a useful
exercise in itself.

If you think six months is far too long, you are clearly a hasty
fellow, in which case a full year would be more appropriate.

(Note that this advice is not of my own making. It has been kicking
around Usenet much longer than I have.)

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999

softdeveloper007

unread,
Feb 16, 2009, 2:28:14 AM2/16/09
to
On Feb 15, 11:00 pm, Han from China <autistic-pedan...@comp.lang.c>
wrote:

aha! got to love the attitude on that. thumbs up!

softdeveloper007

unread,
Feb 16, 2009, 2:36:14 AM2/16/09
to

opinion is like asshole, everyone has one. but apparently your one
exception. :-)

nick_keigh...@hotmail.com

unread,
Feb 16, 2009, 2:56:28 AM2/16/09
to
On 16 Feb, 03:25, softdeveloper007 <softdeveloper...@gmail.com> wrote:
> On Feb 15, 4:46 pm, Ian Collins <ian-n...@hotmail.com> wrote:
> > softdeveloper007 wrote:

> in addition to this C group, i also posted it on two other C++ groups.

since comp.lang.c is not a C++ you did not "post it on two
other C++ groups"

> with due respect, as long as it fits, i don't see the reason why not,


> saving valuable resources for posts like "bikini babes"?

You are an idiot. C and C++ are two different languages.
Did you post your C++ question on a Fortran group?

> > > > guys, thanks for all your inputs.

glad to be of help.

<snip>

ps. answering question before my first coffee does not
make me grumpy it makes me see the world more clearly.


--
Nick Keighley

softdeveloper007

unread,
Feb 16, 2009, 3:06:38 AM2/16/09
to

save the religious crap for yourself ok? did i say my question was "C+
+ question"? grow up! drink two or three gallons of milk, if that
helps at all.

get a life, will ya?

Richard Heathfield

unread,
Feb 16, 2009, 3:13:46 AM2/16/09
to
softdeveloper007 said:

<snip>

> opinion is like asshole,

You get to choose what you write, but I get to choose what I read
and whom I take seriously. So far, you're not doing very well.
Obviously you aren't required to be worried about that. (Equally,
I'm not required to be worried about your C questions.)

softdeveloper007

unread,
Feb 16, 2009, 3:16:25 AM2/16/09
to

hehe, your disgruntled and wining (what a miserable life!:-)) and your
here suspecting others are not doing well? what a irony. :-)

softdeveloper007

unread,
Feb 16, 2009, 3:43:48 AM2/16/09
to
On Feb 16, 12:13 am, Richard Heathfield <r...@see.sig.invalid> wrote:

now tell us if you have figured out the logic behind the "a-hole"
analogy, mister smarty pants? :-)

Han from China

unread,
Feb 16, 2009, 4:11:23 AM2/16/09
to
softdeveloper007 wrote:
> opinion is like asshole, everyone has one. but apparently your one
> exception. :-)

Don't take his bait. The first half of his post is sensible advice,
but then he starts attacking you indirectly ("ignorant") and trying to
pick more fights on this newsgroup by attacking others. If you do pay
attention to this newsgroup, you will find that the people he calls
trolls and pretends to have killfiled are responsible for posts like this:

---------------------------------------------------------------------------
Richard Heathfield wrote:
> and evaluating an array expression gives you a pointer, not an array.
> (The only times this isn't the case are sizeof and "address of" - i.e.
> sizeof arrname and &arrname.)

You missed a third case, Dicky: a string literal initializing an
array.

Yours,
Han from China
---------------------------------------------------------------------------

Such trifles aren't victories of any kind (real C victories are producing
the pieces of software that Jacob Navia, Paul Hsieh, and the many other
victims of his trolling have produced), but he has built his reputation on
this newsgroup by claiming victories for such trifles while never being able
to produce any real C victories. For the record, I haven't produced any
real C victories either, but at least I'm not arrogant enough to attack
those who have.

Witness the seething envy in his words:

"(2) Jacob Navia's naive and aggressively hostile reaction to criticisms is
undoubtedly behind the use of the word "paranoia". Whether Jacob Navia is
truly paranoid is not a matter on which comp.lang.c is competent to
decide. You need a psychiatrist for that. But for the record, I don't
think he's paranoid. I just think he's dumb. If he wised up and learned
how to take crits and where to post what, what he perceives as "attacks"
would just drop away."

"Anyway, all this is academic. The point you have completely missed is
this - Jacob is damaging his reputation *here*, right here in comp.lang.c,
and that's not a good place for a C compiler-writer to make an idiot of
himself."

"The user has learned one of three things: either he didn't read the
lcc-win32 documentation properly, or the implementor of lcc-win32 is an
idiot, or the implementor of lcc-win32 is malicious. A perusal of the
documentation will determine whether it's the first. If not, then
presumably Hanlon's Razor applies."

softdeveloper007

unread,
Feb 16, 2009, 4:53:24 AM2/16/09
to
On Feb 16, 1:11 am, Han from China <autistic-pedan...@comp.lang.c>
wrote:

well, although both are good, but this one of you does exceed the
quality of the previous post, i gave it a 10. :-)

softdeveloper007

unread,
Feb 16, 2009, 4:54:51 AM2/16/09
to
On Feb 16, 1:53 am, softdeveloper007 <softdeveloper...@gmail.com>
wrote:

i mean, does NOT exceed...another typo, sorry:-)

nick_keigh...@hotmail.com

unread,
Feb 16, 2009, 5:08:01 AM2/16/09
to
On 16 Feb, 09:53, softdeveloper007 <softdeveloper...@gmail.com> wrote:
> On Feb 16, 1:11 am, Han from China <autistic-pedan...@comp.lang.c>
> wrote:
> > softdeveloper007 wrote:

> > > opinion is like asshole, everyone has one. but apparently your one
> > > exception. :-)

I think you meant "...apparently you're one exception" or better
"...apparently you are an exception"


> > Don't take his bait. The first half of his post is sensible advice,

<snip>

> well, although both are good, but this one of you does exceed the
> quality of the previous post, i gave it a 10.

I'll be kind to you. You are a newbie if a bit foolish.

Han from China is a troll and his advice, at best, should be
treated with a pinch of salt. Few of the knowledgable regular
posters read what he posts so he gets very little critique.
It is up to you to decide, but you might get better C advice if,
well, you listened to the advice you are offered. I assume you want
to learn something about C?

Richard

unread,
Feb 16, 2009, 5:13:44 AM2/16/09
to
nick_keigh...@hotmail.com writes:

You should read more of his posts. His C knowledge could buy and sell
yours (and mine) twenty times over. He has Heathfield nailed. RH is an
arrogant arsehole with the petulant tendencies I have frequently found
in self righteous god botherers and ego maniacs. No one doubts his C
knowledge. One must, however, doubt his common sense. The attacks on
Jacob, as outlined in Han's previous post, are nothing short of
psychotic jealousy.

softdeveloper007

unread,
Feb 16, 2009, 5:16:55 AM2/16/09
to
On Feb 16, 2:08 am, nick_keighley_nos...@hotmail.com wrote:
> On 16 Feb, 09:53, softdeveloper007 <softdeveloper...@gmail.com> wrote:
>
> > On Feb 16, 1:11 am, Han from China <autistic-pedan...@comp.lang.c>
> > wrote:
> > > softdeveloper007 wrote:
> > > > opinion is like asshole, everyone has one. but apparently your one
> > > > exception. :-)
>
> I think you meant "...apparently you're one exception" or better
> "...apparently you are an exception"

i meant, you got to have more than just one, otherwise it'd be beyond
explanation where all the bs came from. LOL

now, do us a favor, dump it at your own backyard if do have the urge,
ok? :-)

softdeveloper007

unread,
Feb 16, 2009, 5:24:59 AM2/16/09
to
On Feb 16, 2:13 am, Richard <rgrd...@gmail.com> wrote:

hehe, i'd not hire him even he's better than jacob, his attitude
doesn't sell at all.:-)

softdeveloper007

unread,
Feb 16, 2009, 5:27:25 AM2/16/09
to
On Feb 16, 2:24 am, softdeveloper007 <softdeveloper...@gmail.com>

and yes, you do need "attitude" not just "knowledge" to "produce".

Han from China

unread,
Feb 16, 2009, 6:35:05 AM2/16/09
to
Nick Keighley wrote:
> Few of the knowledgable regular posters read what he posts so he
> gets very little critique.

No, quite a number of knowledgeable regular posters read what I post. For
the sake of argument, I'll exclude those who have been called trolls and
those people who pretend not to read my posts. If you check the recent
archives, you can see that even in recent times I've had mature
discussions with and/or have received serious replies from Tim Rentsch,
pete, Ben Bacarisse, Nate Eldredge, John Bode, Kaz Kylheku, blaarg, Jacob
Navia ("semi-troll"), Larry Jones, Ben Pfaff, Richard Tobin, Richard
Harter, Anthony Fremont ("semi-troll"), etc. All you have to do is search
the archives to see this is true. I'm sorry to anyone I've left out -- my
regexp skills leave a lot to be desired. Does anyone want to shame
himself/herself and admit that he/she too is a Han fan?

You can rest assured my posts will be critiqued on their C content. To
demonstrate otherwise, all you have to do is show one C thing I got wrong
that wasn't critiqued. The OP should observe as Nick Keighley is unable to
do this and then decide how much merit Keighley's opinions should be
given. After all, Keighley is the guy who said getchar() isn't a standard
function, and the only way that claim could have passed the critique of so
many knowledgeable posters is if they had seen my reply to such a
preposterous claim.

nick_keigh...@hotmail.com

unread,
Feb 16, 2009, 8:46:27 AM2/16/09
to
On 16 Feb, 10:13, Richard <rgrd...@gmail.com> wrote:

> nick_keighley_nos...@hotmail.com writes:
> > On 16 Feb, 09:53, softdeveloper007 <softdeveloper...@gmail.com> wrote:
> >> On Feb 16, 1:11 am, Han from China <autistic-pedan...@comp.lang.c>
> >> wrote:
> >> > softdeveloper007 wrote:

<snip stuff>

> >> > Don't take his bait. The first half of his post is sensible advice,
>
> > <snip>
>
> >> well, although both are good, but this one of you does exceed the
> >> quality of the previous post, i gave it a 10.
>
> > I'll be kind to you. You are a newbie if a bit foolish.
>
> > Han from China is a troll and his advice, at best, should be
> > treated with a pinch of salt. Few of the knowledgable regular
> > posters read what he posts so he gets very little critique.
> > It is up to you to decide, but you might get better C advice if,
> > well, you listened to the advice you are offered. I assume you want
> > to learn something about C?
>
> You should read more of his posts.

He is the only usenet poster I have ever fully plonked.
Usually I just stop responding whilst continuing to read people.
HfC I don't even read. I also don't read most of his responders
either (you, Twink and MaCormack (aplogies for spelling)).
I gathered his signal/troll ratio had improved, but life is
just so much better without him.

And my point about lack of meaningful criticism still
stands.

> His C knowledge could buy and sell
> yours (and mine) twenty times over. He has Heathfield nailed.

<snip personnel insults>

> No one doubts his C
> knowledge. One must, however, doubt his common sense. The attacks on
> Jacob, as outlined in Han's previous post, are nothing short of
> psychotic jealousy

at first I thought you talking about HfC but I see it's RH.
Yes, RH and Jacob do seem to rub each other up the wrong way.
I tend to ignore those bits. Much as I normally ignore
similar stuff from you...


--
Nick Keighley

Charlton Wilbur

unread,
Feb 16, 2009, 9:42:33 AM2/16/09
to
>>>>> "sd" == softdeveloper007 <softdeve...@gmail.com> writes:

sd> well, although both are good, but this one of you does exceed
sd> the quality of the previous post, i gave it a 10. :-)

You're making a grave mistake. Richard Heathfield can be cranky, and
will scold you for violations of netiquette, but his C advice is almost
always correct. "Han from China" is affable and amiable, but will give
you bad advice intentionally.

I know which one I'd rather get advice from.

Charlton


--
Charlton Wilbur
cwi...@chromatico.net

Han from China

unread,
Feb 16, 2009, 9:50:20 AM2/16/09
to
Nick Keighley wrote:
> He is the only usenet poster I have ever fully plonked.

Yeah, yeah... ;-) The only difference between you and Chuck is that you
don't screw up as Chuck does by accidentally replying directly to someone
you've supposedly killfiled.

> I also don't read most of his responders

Proposition 1.

> And my point about lack of meaningful criticism still stands.

Proposition 2.

Unless you're willing to provide more information, it would seem that
propositions 1 and 2 contradict each other. If you read neither my posts
nor the posts of most of my responders, how can you judge whether I'm
receiving meaningful criticism or not? Why should the OP listen to you if
you have no idea what I'm saying or what the people responding to me are
saying? All the OP has to do is check the archives -- even for the last
week or two -- and see how many decent and knowledgeable people don't
consider it a waste of their time to engage in civil discussions about C
with me.

> I gathered his signal/troll ratio had improved

Nobody on this newsgroup has a signal:troll ratio higher than 10. Sosman
would be a 9.5-10; Thompson 8.5 - 9.5; you would be 8-9; Falconer would be
3-4; and Heathfield would be 2-3. I'm content to linger around 2-3 with
Dicky and hope to join Falconer by the end of the year.

Richard

unread,
Feb 16, 2009, 10:00:41 AM2/16/09
to
Charlton Wilbur <cwi...@chromatico.net> writes:

>>>>>> "sd" == softdeveloper007 <softdeve...@gmail.com> writes:
>
> sd> well, although both are good, but this one of you does exceed
> sd> the quality of the previous post, i gave it a 10. :-)
>
> You're making a grave mistake. Richard Heathfield can be cranky, and
> will scold you for violations of netiquette, but his C advice is almost
> always correct. "Han from China" is affable and amiable, but will give
> you bad advice intentionally.

I will call you on that. Where is that bad advice of which you speak?

Han from China

unread,
Feb 16, 2009, 11:00:23 AM2/16/09
to
Richard wrote:
> I will call you on that. Where is that bad advice of which you speak?

Don't you know... all the stuff I write about C is made up, the Standard
quotes aren't real, the Standard subclause numbers are randomized, and
non-"trolls" like Tim Rentsch, pete, Ben Bacarisse, Nate Eldredge, John


Bode, Kaz Kylheku, blaarg, Jacob Navia ("semi-troll"), Larry Jones, Ben
Pfaff, Richard Tobin, Richard Harter, Anthony Fremont ("semi-troll"),

Barry Schwarz, etc., aren't *really* dignifying my presence with
thoughtful replies; they're simply playing along for fun because, hell,
everybody likes a disruptive troll.

Han from China

unread,
Feb 16, 2009, 11:42:18 AM2/16/09
to
Charlton Wilbur wrote:
> Richard Heathfield can be cranky, and will scold you for violations
> of netiquette,

Hypocritically. The guy often engages in off-topic discussions on
this newsgroup, including about Shakespeare, English grammar, and
English history. Evidence available on request.

> but his C advice is almost always correct.

No, it's just that few people are willing to correct his errors.
Besides me, who corrected the error about the array/pointer decay
thing that I quoted upthread? Where were Keith, Ben, James, and the
rest then? That's where the REAL risk lies -- not in the advice from
the so-called "trolls", since that advice will always be heavily
scrutinized. You KNOW I have a point here, but whether you'll grant
it is none of my concern.



> "Han from China" is affable and amiable,

Proposition 1.

> but will give you bad advice intentionally.

Proposition 2.

Unless you're willing to provide more information, it would seem that

propositions 1 and 2 contradict each other... (etc., etc.)

C'mon, guys, this is starting to get silly now! ;-)

My topicality guidelines that I give people were carefully written.
I can back up every statement with evidence. In fact, the only
flaws of which I'm aware are that the guidelines should be more
explicit about making topicality meta discussions on-topic and
that the reference to comp.lang.perl needs to be changed to
comp.lang.perl.misc.

blargg

unread,
Feb 16, 2009, 12:50:53 PM2/16/09
to
softdeveloper007 wrote:
[...]

> now it's getting clearer....but still not crystal...
> just signed up in a rush and didn't have chance to figure out how to
> and how not to.

Didn't have the chance or didn't have the care?

> the topics in my post covers call by reference, reference to pointer,
> linked list...which would be considered "appropriate" for both C, C++
> and even data structure groups if there are any.

The point is that you should try posting to ONE group first, and see how
that goes. If after several days you haven't gotten a useful response,
THEN try posting to another group.

> on one hand, one
> would like to have maximum possible exposure of his or her post for
> those who are interested from info-sharing perspective,

Yes, you should post to every newsgroup, just in case someone in one has
an answer. This is the selfish, impatient approach; it's putting the
benefit of one over the benefit to everyone else.

> on the other
> hand, courtesy and etiquette are necessary for not to "force" those
> who read it multiple times just to figure out the nuanced details if
> any.

Think efficiency, since that's the main purpose of multiple newsgroups. A
person has limited time to participate in them, and isn't interested in
everything, so he'd like to narrow things down to only what he's
interested in. The newsgroup division supports this, as long as people
don't post to the same topic to multiple groups unnecessarily, or post
off-topic things.

> seems cross-posting is the way,

No, cross-posting isn't the way. Post to one group first. The goal
shouldn't be to get the maximum number of replies, but to get a SUFFICIENT
answer. One group is usually sufficient, assuming you choose the correct
one.

Golden California Girls

unread,
Feb 16, 2009, 1:53:34 PM2/16/09
to

You are wrong about Mr. Heathfield. He is warm and generous to a fault,
compared to CBF. Of course CBF's advice is on par with Han's.

Han from China

unread,
Feb 16, 2009, 3:02:07 PM2/16/09
to
Golden California Girls wrote:
> Of course CBF's advice is on par with Han's.

If I recall, you've yet to provide evidence for that statement.

Keighley says my posts don't receive enough critique. Now watch as
I critique Keighley's posts, starting from today.

Han from China

unread,
Feb 16, 2009, 4:30:26 PM2/16/09
to
Han from China wrote:
> Golden California Girls wrote:
>> Of course CBF's advice is on par with Han's.
>
> If I recall, you've yet to provide evidence for that statement.

I apologize. I don't like being lumped with CBF, but I can't help
but chuckle at the amusing side of your statement, self-deprecating
as my chuckling is. People who make me chuckle get a free pass,
no matter how mean they are to me.

Barry Schwarz

unread,
Feb 16, 2009, 11:46:30 PM2/16/09
to
On Mon, 16 Feb 2009 00:06:38 -0800 (PST), softdeveloper007
<softdeve...@gmail.com> wrote:

snip

>save the religious crap for yourself ok? did i say my question was "C+
>+ question"? grow up! drink two or three gallons of milk, if that
>helps at all.

Actually you did. Your subject contains a C++ specific term. Your
code contained C++ specific syntax. And after being advised of this,
you choose to continue the discussion in a group that discusses a
completely different language because ...

--
Remove del for email

Richard

unread,
Feb 16, 2009, 11:49:44 PM2/16/09
to
Barry Schwarz <schw...@dqel.com> writes:

Except C++ is not a completely different language and the great majority
of real world C would probably compile with a C++ compiler with minor
changes. And knowing what these are and what experiences the C
programmers here have with that is clearly a real world issue and most
certainly on topic.

Old Wolf

unread,
Feb 16, 2009, 11:51:06 PM2/16/09
to
>
> Your best course of action, at this point, is to spend six months
> reading every article in the newsgroups to which you have
> subscribed (without posting any further articles). Why? Because
> newsgroups - like any other communities - have a culture, and each
> newsgroup's culture is slightly different, and it's good manners to
> take notice of a community's culture when seeking to become a part
> of that community. After six months or so of diligent reading of
> every article posted in that group, you'll be sufficiently aware of
> the community's customs that you can begin to post without fear of
> ignorantly offending people. You will also have begun the process
> of separating the truth-tellers from the liars, the trolls from the
> non-trolls, and the knowledgeable from the ignorant, a useful
> exercise in itself.

Is this one of those forged troll posts?

Richard

unread,
Feb 16, 2009, 11:58:13 PM2/16/09
to
Old Wolf <old...@inspire.net.nz> writes:

I tend not to think so since it brings attention to the big "I" at the
end.

Han from China

unread,
Feb 17, 2009, 4:08:12 AM2/17/09
to
Old Wolf wrote:
> Is this one of those forged troll posts?

Not of which I'm aware.

It's very interesting that you ask, though. One of the positive consequences
of this newsgroup's current fixation on the "trolls", a fixation unmatched in
the newsgroup's history, is that people are more readily perceiving the
trolling and baiting of those who had been getting away with it with
impunity just because they talk C from time to time.

Heathfield often talks C and can be very helpful. But he has a trolling
and baiting side that is undeniable. And that's exactly what vippstar
said in his thread about the dangerous ploy of me and the rest of the
"trolls", isn't it? I quote:

There's a recent maneuver employed by trolls, in which "Han from
China" and others participate to. Han most notably I believe. They
post worthwhile, ontopic technical information mixed & trolling
messages.

Han is being pedantic enough and I believe some of you haven't
killfiled him yet because of such posts of his that demonstrate that.
At the same time, he posts other messages too. More trolls could start
doing this, and it'd be bad.

At first I thought vippstar was engaging in some lame reverse psychology
attempt, but further reflection convinced me that he simply was making
a perceptive statement and unwittingly drawing attention to others
in the process.

nick_keigh...@hotmail.com

unread,
Feb 17, 2009, 4:42:05 AM2/17/09
to
On 17 Feb, 04:49, Richard <rgrd...@gmail.com> wrote:

> Barry Schwarz <schwa...@dqel.com> writes:
> > On Mon, 16 Feb 2009 00:06:38 -0800 (PST), softdeveloper007
> > <softdeveloper...@gmail.com> wrote:


> >>save the religious <expletive> for yourself ok? did i say my question
> >>was "C++ question"?

<snip rant>

> > Actually you did.  Your subject contains a C++ specific term.  Your
> > code contained C++ specific syntax.  And after being advised of this,
> > you choose to continue the discussion in a group that discusses a
> > completely different language because ...

exactly. Making a mistake is ok, we all do that. But continuing
to repeat the mistake after you have been informed of it is just dumb.

> Except C++ is not a completely different language and the great majority
> of real world C would probably compile with a C++ compiler with minor
> changes.

but not if it includes a C++ reference

> And knowing what these are and what experiences the C
> programmers here have with that is clearly a real world issue and most
> certainly on topic.

...to comp.lang.c++

are we supposed to discuss java or perl because they share some
syntax with C?

Han from China

unread,
Feb 17, 2009, 6:30:50 AM2/17/09
to
Nick Keighley wrote:
>> And knowing what these are and what experiences the C
>> programmers here have with that is clearly a real world issue and most
>> certainly on topic.
>
> ...to comp.lang.c++
>
> are we supposed to discuss java or perl because they share some
> syntax with C?

Oh, give it a rest, Keighley. People discuss C++ here all the time.
We've even had quotes from n2798 from many of our regs.

I find it ironic that you would post the above and then go on to
mention C++ smart pointers in the thread "advice/thoughts on garbage
collection?"

No sense of irony has Keighley.

Richard

unread,
Feb 17, 2009, 8:25:48 AM2/17/09
to

Indeed.

Kenny McCormack

unread,
Feb 17, 2009, 9:12:03 AM2/17/09
to
In article <gndfla$20v$2...@rgrdev.motzarella.org>,

Richard <rgr...@gmail.com> wrote:
...
>Except C++ is not a completely different language

Oh, oh. The regs will get you for that. Do we really want another
iteration of:

"C++ is pretty much similar to C"

"No, it's not"

"Is too, is too"

"Is not, is not"

"Is too, is too"

"Is not, is not"

"Is too, is too"

"Is not, is not"

etc.

>and the great majority of real world C would probably compile with a
>C++ compiler with minor changes.

See above.

>And knowing what these are and what experiences the C
>programmers here have with that is clearly a real world issue and most
>certainly on topic.

No, no, no. The real world is clearly off-topic.
This has been made clear (as well as stated explicitly) thousands of
times over the years.

Richard

unread,
Feb 17, 2009, 9:23:07 AM2/17/09
to
gaz...@shell.xmission.com (Kenny McCormack) writes:

This group is about C. And as a C programmer I like to stay informed as
to what issues C might have if compiled with a more modern C++
compiler. I am surprised other C programmers here do not feel the same -
especially if staying standard compliant helps in that desire.

I, for one, welcome our new dominant Alpha "C" Male overlords here in
c.l.c. And its good to see a few of the weasels hopping off the sinking
ship now that they have, at last, seen reason.

0 new messages