----- Original Message -----
From: "a R T u n" <mu********@gmail.com>
Newsgroups: comp.lang.c++
Sent: Tuesday, July 26, 2005 1:26 AM
Subject: Re: pointer error...
just none... only a newbie in pointers...
Did you understand the answers?
int *p = 0; // Defines a pointer pointing to "nothing" (a NULL pointer)
You can't use this before you point it to some place to actually store the
interger.
*p = 1024; // Error, p isn't pointing to anything your program owns.
p = new int; // allocates sizeof(int) memory, p now "points" to it.
*p = 1024; // Now 1024 goes into those sizeof(int) bytes that were
allocated.