Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

POINTERS AND METAPHORS

Name: Anonymous 2007-07-23 15:53 ID:taAuoXNg

What's the best way to describe pointers using metaphors?

A friend of mine told me once:
"A woman is a pointer, because she holds the number of the man's bank account."

Any other metaphors?

Name: Anonymous 2007-07-23 15:55 ID:cqMD7PyV

A pointer is like some value which designates a place in memory.

Name: Anonymous 2007-07-23 16:00 ID:Heaven

A pointer is like a nigger, because they like fried chicken.

Name: Anonymous 2007-07-23 16:24 ID:taAuoXNg

>>8 will probably have something good to say.

Name: Anonymous 2007-07-23 16:50 ID:cqMD7PyV

>>4
lol, I really doubt it

Name: Anonymous 2007-07-23 16:51 ID:taAuoXNg

>>5 OMG, >>8 is coming! :O

Name: Anonymous 2007-07-23 17:26 ID:te2YrsfH

Here it comes...

Name: Anonymous 2007-07-23 17:28 ID:Heaven

something good

Name: Anonymous 2007-07-23 17:51 ID:taAuoXNg

I told you, >>5.

Name: Anonymous 2007-07-23 21:44 ID:rqhbeVWs

Name: Anonymous 2007-07-23 21:44 ID:rqhbeVWs

>>10 is a pointer.

Name: Anonymous 2007-07-24 3:55 ID:f4vX9n3+

A pointer is an integer value bound to a variable like any other, which happens to be the address of something interesting in the current process memory space.

Name: Anonymous 2007-07-24 4:09 ID:qw9qdqKL

>>12
thats a shitty confusion inducing metaphor

Name: Anonymous 2007-07-24 4:57 ID:Heaven

There is no need to use metaphors to explain pointers if you are intelligent.

Name: cman !!69S+hMqY03XpMGG 2007-07-24 5:05 ID:Zg+DhFuv

>>1

Answer these questions:

int bar[1];
What type is bar?
What type is bar[0]?
What type is *bar?
What type is &bar[0]?


char a; char *b;
What type is &a?
What type is b?
What are the implications of this?

Name: Anonymous 2007-07-24 5:52 ID:qw9qdqKL

What type is bar? int [1]
What type is bar[0]? int
What type is *bar? int
What type is &bar[0]? int*
What type is &a? char*
What type is b? char*
What are the implications of this? you are a daft cunt

Name: Anonymous 2007-07-24 7:28 ID:f4vX9n3+

A pointer is like my cock, up your sister's ass.

Name: Anonymous 2007-07-24 7:43 ID:geuULkSu

int[1] isn't a type, but int[] is

Name: Anonymous 2007-07-24 7:45 ID:0cdzsnrN

>>16,18
int*

Name: Anonymous 2007-07-24 7:47 ID:1NaUwGNN

>>2
>>3
>>17

A metaphor is like a simile but not quite the same.

Name: Anonymous 2007-07-24 7:47 ID:geuULkSu

>>19

No, int[]

Name: Anonymous 2007-07-24 7:50 ID:OHEtDxI6

>>19 there is a difference between an array and a pointer

Name: Anonymous 2007-07-24 8:13 ID:Plr7YOa4

>>20
Kinda like the difference between theory and practice, then?

Name: Anonymous 2007-07-24 8:21 ID:f4vX9n3+

>>23
The compiler treats
int i[20][20]
differently from
**i
and this is one of C's rough spots.

Name: Anonymous 2007-07-24 8:48 ID:Heaven

>>22
for the compiler
const char test[] = "abc";
and
const char * const test = "abc";
is exactly the same, however the concept of an array is very differend than the concept of a pointer.

I can't believe you fags still confuse that shit.
faggots.

Name: Anonymous 2007-07-24 11:37 ID:s6CM+yN7

>>25
THIS IS WHY I HATE C/C++
const int& mutable const volatile long long void int function(const& int const var, const) const WTF

Name: Anonymous 2007-07-24 11:43 ID:Heaven

>>25 here
>>26 so you hate C because you are unable to comprehend the simpliest of keywords? maybe programming is not for you.

Name: Anonymous 2007-07-24 17:51 ID:8Cr/eIC8

>>27
One word, ``static''. Thread over

Name: Anonymous 2007-07-24 20:58 ID:Zg+DhFuv

my questions exposed you ignorant retards for the frauds you are. those are simple questions that a C beginner needs to know before talking about pointers being "integers"(wtf) pointing to "memory"(wtf), and you, /prog/rammers, have failed.

try harder not to make yourselves look stupid next time.

Name: Anonymous 2007-07-24 21:00 ID:Heaven

look stupid next time.
well i certainly aint the one who needs help with pointers.

Name: Anonymous 2007-07-24 23:14 ID:ha2CBS+3

char a[] = "hi";
char* a = "hi";
assert(&a == a);
assert(&a != a);

Name: Anonymous 2007-07-24 23:14 ID:ha2CBS+3

disregard that, etc.

char a[] = "hi";
assert(&a == a);

and..
char* a = "hi";
assert(&a != a);

Name: Anonymous 2007-07-24 23:24 ID:qw9qdqKL

int x[5];
int *y = x;
int *z = &x;

Name: Anonymous 2007-07-25 5:18 ID:Heaven

INTENSE FAILURE

Name: Anonymous 2007-07-25 5:20 ID:WAZxaUe7

Name: Anonymous 2007-07-25 7:43 ID:Heaven

>>32
you're a fucking failure.

char a[] = "test";

In the above case, a is NOT the same with &a.
if you don't understand that you need to re-read your C book.

Name: Anonymous 2007-07-25 8:00 ID:WAZxaUe7

>>33
x is of type int(*)[5]

try harder

Name: Anonymous 2007-07-25 8:25 ID:WAZxaUe7

>>37
oops. &x

Name: Anonymous 2011-02-04 14:09

Don't change these.
Name: Email:
Entire Thread Thread List