473,889 Members | 1,387 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Mastering C Pointers"....

Hey guys, I'm new here, just a simple question.

I'm learning to Program in C, and I was recommended a book called,
"Mastering C Pointers", just asking if any of you have read it,
and if it's worth the $25USD.

I'm just looking for a book on Pointers, because from what I've
read it's one of the toughest topics to understand.

thanks in advanced.

sincerely ... Andy
Nov 13 '05
388 21994
Default User wrote:
Irrwahn Grausewitz wrote:
Alan Connor <zz****@xxx.yyy > wrote:

<snip>
Please fix your sig, Lew. It's over 4 lines and I'll have to killfile you
for 30 days if I see it again.


Oh, how threatening. Nobody here cares about trolls plonking
respectable and responsible posters in favour of other trolls.
Honestly.


Alan is actually correct about that. As the .sig has a couple blank
lines in it, it could be brought up to code with no loss of content.


Point taken.

As you can see, I've reduced my signature to exactly four lines in
conformance with Netiquette standards.

--
Lew Pitcher, IT Consultant, Application Architecture
Enterprise Technology Solutions, TD Bank Financial Group
(Opinions expressed here are my own, not my employer's)
[fourth line added to conform to Usenet Netiquette standards]

Nov 13 '05 #181
Alan Connor wrote:
Why do you assume that I lack both eyes and common sense?
Your behavior.
Richard and a few others have done almost nothing but attack Roos since
the thread began.
Untrue.
That's the only troll-like behavior I have seen here.


I'm not 100% sure, but it's possible that you and "Roose" are the same
person. Maybe, maybe not. However, if not, your lack of sense and
continued attack on respected members of the newsgroup have earned you
this, along with "Roose":
*plonk*


Brian Rodenborn
Nov 13 '05 #182
Yes, I'd be quite curious to think what might happen... : ) Are they going
to come over my house and bother me about standard C? The world of C is
quite large, and I work in commercial software development, and it is
doubtful that many here do. Their tendencies seem to skew them toward
rejecting that world.

<te*********@BU SThotmailE.Rcom > wrote in message
news:1g3wbxa.1l zfvmk112ar5sN%t e*********@BUST hotmailE.Rcom.. .
Roose <no****@nospam. nospam> wrote:
Let me just dispatch all of these flames toward Alan about me being a troll, and his judgement and whatnot, with one comment...


Just wanted to mention that while these people are willing to restrict
their assault on you to this newsgroup, they can be extremely vindictive
and are willing to take this assault beyond the confines of USENET
should you persist.

Whether you like it or not Richard H, et. al. are well respected and
influential C programmers and are willing to use this respect and
influence to smack other people down when they see fit.

You cannot win. You will only harm yourself. They will not stop.
--

Nov 13 '05 #183
Joona I Palaste wrote:
JQuest <xe**@quest.net > scribbled the following:
On Tue, 4 Nov 2003, Richard Heathfield wrote:
void PrintObjectRepr esentation(FILE *fp, void *p, size_t len)
{
unsigned char *objrep = p;
while(len--)
{
printf(fp, " %X", *objrep++); <============== ===== ?!
}
putc('\n', fp);
}

Is that a typo? I don't get this printf.


Neither do I. Methinks it should be fprintf.


Metoo thinks it should be fprintf. Oops, sorry.
--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #184
Default User <fi********@boe ing.com.invalid > wrote:
Irrwahn Grausewitz wrote:

Alan Connor <zz****@xxx.yyy > wrote:

<snip>
Please fix your sig, Lew. It's over 4 lines and I'll have to killfile you
for 30 days if I see it again.


Oh, how threatening. Nobody here cares about trolls plonking
respectable and responsible posters in favour of other trolls.
Honestly.

Alan is actually correct about that. As the .sig has a couple blank
lines in it, it could be brought up to code with no loss of content.


Brian Rodenborn


As your post contains several excess blank lines and lacks a proper
signature delimiter, it could be bro~~~*"%c$")"s s/%- <No Carrier>
;-))
--
Irrwahn
(ir*******@free net.de)
Nov 13 '05 #185
On Tue, 4 Nov 2003 01:50:04 -0600, Randy Howard <ra**********@F OOmegapathdslBA R.net> wrote:


In article <bo**********@h ercules.btinter net.com>,
do******@addres s.co.uk.invalid says...
Alan Connor wrote:

<snip>
> We'll see. But trolling gets anyone killfiled for a while. I don't care
> if it's being done by Dennis Ritchie.


Ah, the irony! The exquisite irony!


*cackle*

--
Randy Howard _o
2reply remove FOOBAR \<,
_______________ _______()/ ()_____________ _______________ _______________ ___
SCO Spam-magnet: po********@sco. com


I really don't like watching people masturbate in public.

Killfiled for 60 days.

--
Alan C this post ends with w
q
Nov 13 '05 #186
te*********@BUS ThotmailE.Rcom wrote:
Whether you like it or not Richard H, et. al. are well respected and
influential C programmers
It's kind of you to say that.
and are willing to use this respect and
influence to smack other people down when they see fit.
That's not so kind, and it's not true either. I am, however, willing to use
/logic/ in the course of discussions in this newsgroup. Influence and
respect are fine things to have, but those who abuse respect will soon lose
it.
You cannot win. You will only harm yourself. They will not stop.


Well, I don't see any reason to stop posting corrections to errors if I
happen to notice them. Nor do I see any reason for other people to stop
posting corrections to /my/ errors. Error correction is part and parcel of
the culture of this newsgroup (and it shares that in common with several
other newsgroups that I know of, so I don't see a big deal here).

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #187
On Tue, 04 Nov 2003 07:49:07 GMT, Roose <no****@nospam. nospam> wrote:

After reading the first 1/3 carefully, it seems to me that a pointer is very
much like a symlink.


Uh, I'm not exactly sure what a symlink is, but if it is anything like a
Windows shortcut, there is definitely an analogy there.


I believe so. But it's probably more accurate to call a symlink/shortcut
a pointer :-)

[ Symlink: I have a file named foo in my home directory. There's nothing
there but the name (size 3 bytes, say), yet when I open it in a pager, a
4kb file is there, and it's actual location is a completely different
directory and it has a completely different name. ]

The windows shortcut just stores the location of a file. A "pointer" to it.
An address. The address is the _path name_. In C, the "address" is
basically an integer, indicating where in a huge array of memory the
variable is.

That's it.
You can have as many shortcuts as you want that point to the file. A
shortcut takes a small amount of storage, but not as much as a (typical)
file. You can have whole directories of shortcuts that point to files all
over the place, in order to organize them.
Same for symlinks. They can also point to directory trees.
Likewise, you can have
collections of pointers, that point to various different things _scattered_
all over memory.

Yep.
For example, on my hard disk, I have a whole bunch of (legal) MP3s organized
by artist and by album. Now, some of them were ripped poorly and have
clicks. So I *could* just copy those files to another folder, in order to
note that I need to rip them again.

However, it is *much* easier and efficient to just copy shortcuts those bad
files into another folder -- called "bad". That way I don't duplicate any
data. And I have all the bad files organized in one directory, and can
access them easily.

Indeed. All this stuff is sure a lot easier on Linux/UNIX, though, assuming
the usual bloated inefficiency of Windoze (even if you are running an older
release that still has DOS. (couldn't resist :-)

You could do the exact same thing with pointers. Suppose I had a whole
bunch of strings in memory, that listed a ton of song names. I could create
an array of pointers called "theBeatles " that pointed to every single song
by the Beatles. Then I could have an array of pointers called "badFiles"
that pointed to all the bad files, _some of which_ may be by the Beatles.
Note that I haven't incurred the storage cost of repeating the strings,
*just* pointers to them. Likewise I could create another array called
"before1960 " that points to all songs stored before 1960 -- you get the
idea.

Hm, I'm surprised this didn't come up earlier. This is an easy analogy.


And that's a huge relief. Still a long way from an actual working program,
though...

It would be really nice to see a line-by-line breakdown of everything that
happens from the time you do:

gcc -o 1stprog hello.c

#include <stdio.h>

/* hello.c print "hello world." */

main()

{

printf("\n\n\nH ello, WORLD!!\n\n\n") ;
}
to the appearance of "Hello, WORLD!!" on the screen.

Would it fill a small book? That would be my guess.
(Rubber Soul is one of my favorite all-time song collections.)
The fact that a bunch of obvious jerks don't like you is an extremely
good recommendation in my book, Roose.

Thanks again.

--
Alan C this post ends with w
q
Nov 13 '05 #188
On Tue, 04 Nov 2003 07:36:07 GMT, Keith Thompson <ks*@cts.com> wrote:


Alan Connor <zz****@xxx.yyy > writes:
[...]
After reading the first 1/3 carefully, it seems to me that a pointer is very
much like a symlink.


That's not a bad analogy. Like any analogy, it can be carried too far
if you're not careful, but it's a good start.


Gottya. Thanks.

--
Alan C this post ends with w
q
Nov 13 '05 #189
On Tue, 04 Nov 2003 07:55:34 GMT, Roose <no****@nospam. nospam> wrote:

This is very sophisticated duelling, and somewhat entertaing, but I'd much
rather you were each expounding upon the fundamentals of C in your individual
and unique styles.


Well, I can do both : )


schizostylistic ? :-)

But I am curious, Roose, as to why you continue feeding the troll? Trolls
don't care about reason or truth or the subject at hand. They pretend to

be
in order to create and win a game of dominance in which they can't

increment
the value of SELF but must decrement the value of OTHER.


Well, I was the one who stopped in the previous flamewar (see the thread
about how you tell if a struct is 0, if you haven't seen it)


I'd rather see how far I can shove bamboo splinters under my fingernails,
thank you.

, and that will likely be the case here.

It's all in good fun. I enjoy a good argument. Richard is at least fun to
argue with, because he grasps basic ideas and arguments (unlike some already
noted, who fail to understand the basic line, and respond with lame insults,
and who I *don't* respond to). Unfortunately, when you corner him, he
resorts to children's games, or simply refuses to answer, and then I stop.
No more fun then.


Exactly. And none of it is very interesting to a novice, who has to wonder
whether the participants are distorting the truth in order to 'win' the
argument...

In all seriousness, I just don't trust the Richard fellow at this point,
in spite of his obvious expertise.

--
Alan C this post ends with w
q
Nov 13 '05 #190

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.