--- "Sharath A.V" <[EMAIL PROTECTED]> wrote: > --- In [email protected], Ray Devore > <[EMAIL PROTECTED]> wrote: > > > > --- uugnaa altaa <[EMAIL PROTECTED]> wrote: > > > I guess, it is more likely the question about > > > pointer to pointer. > > > > > > useing pointer to pointer, you can store address > of > > > the pointer, that is it. > > > > > > int **src, *dst; > > > dst = 200 > > > *src = dst; > > > > <snip> > > > > > The statement > > dst = 200; > > will give an error. You cannot assign an address > to a > > pointer. > > If you cannot assign an address to a pointer, what > else can you assign? > > Here the error would be because that statement is > trying to assign > integer value to a integer pointer. Typecasting that > value to int* > would eliminate the error, however he cannot > dereference it unless > that location is accessible by the program. > Sorry for the confusion. You can assign the address of a variable or dynamically allocated memory, but you cannot assign a literal numeric value to a pointer variable.
Ray ____________________________________________________________________________________ Have a burning question? Go to www.Answers.yahoo.com and get answers from real people who know.
