Page 1 of 1
Pointer Guide
Posted: Wed Jun 16, 2004 4:36 pm
by fingolfin
Posted: Wed Jun 16, 2004 8:23 pm
by pthread
Ha, I just skimmed it... but the "shizzle" made me LMAO.
Pointer Guide
Posted: Fri Jun 18, 2004 10:26 am
by fingolfin
pthread wrote:Ha, I just skimmed it... but the "shizzle" made me LMAO.
Ok, but, what did you think about the content?
content
Posted: Sun Nov 14, 2004 4:02 am
by dstate
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;
}
