Pointer Guide

Have a question for the lug and you are not a member of the mailing list? Or you just want to start a discussion here, go right ahead.

Moderators: snarkout, Patrick, dann

Post Reply
fingolfin
Posts: 6
Joined: Wed Jun 16, 2004 4:22 pm
Location: Between Satan's buttcheeks
Contact:

Pointer Guide

Post by fingolfin » Wed Jun 16, 2004 4:36 pm

http://thelinuxlink.net/~fingolfin/pointer-guide/

Please review for accuracy, clarity, etc.
I'm so happy
'Cause today I found my friends
They're in my head

pthread
Posts: 57
Joined: Wed May 05, 2004 12:53 am
Contact:

Post by pthread » Wed Jun 16, 2004 8:23 pm

Ha, I just skimmed it... but the "shizzle" made me LMAO.

fingolfin
Posts: 6
Joined: Wed Jun 16, 2004 4:22 pm
Location: Between Satan's buttcheeks
Contact:

Pointer Guide

Post by fingolfin » Fri Jun 18, 2004 10:26 am

pthread wrote:Ha, I just skimmed it... but the "shizzle" made me LMAO.
Ok, but, what did you think about the content?
I'm so happy
'Cause today I found my friends
They're in my head

User avatar
dstate
Posts: 8
Joined: Sun Nov 14, 2004 3:19 am
Location: Whitehall, PA
Contact:

content

Post by dstate » Sun Nov 14, 2004 4:02 am

It seems pretty good. Maybe when my vision isn't as blurry in the morning i will look at it again incase i see anything. Though IMO you do not need to do int baz[4] = { 1, 2, 3, 4} }; it can be int baz[] = {1, 2, 3, 4 }; and if you do need the number there it is usually in the case of growing your array in which case if you do things like for loops throughout the code it would be smart to set a define such as MAX etc. otherwise you will be chasing down various portions of code. I do understand its a pointer tutorial, but keeping good practice is something one should always display so others do not get wrong ideas ;)

#include <stdio.h>

#define MAX 4

int main (void)
{
int baz[MAX] = { 1, 2, 3, 4 };

for (int i = 0; i < MAX; ++i)
printf ("%d\n",baz);

return 0;
}
:shock: :shock: :shock: :shock: :shock:
--
"The complexity of software is an essential property not an accidental one."
--Brooks

Post Reply