Welcome! Log In Create A New Profile

Advanced

Pointers

Posted by Tracey 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Pointers
September 30, 2007 07:37PM
Is anybody else having trouble understanding pointers?
Re: Pointers
October 01, 2007 03:54PM
Hi Tracey

I have found this website to be very useful www.cplusplus.com if you need more info in any of the topics we have covered in this module.

Gud luck in your exam !
Re: Pointers
October 01, 2007 04:05PM
thank you so much!
Re: Pointers
October 01, 2007 04:08PM
Hi

would you like to expand the nature of your problem further, we cant help if we do not know exactly what the problem is!!! Pointers is a rather large topic...

D
Re: Pointers
October 01, 2007 04:10PM
Somebody has actually helped me already. If I get confused later on, then I'll post a question. Thanks.
Re: Pointers
October 04, 2007 08:02AM
Actually, I was hoping you would explain your problem so I could learn one or two things.
Re: Pointers
October 04, 2007 08:44AM
what I was confused about was when I had cout << *p1, the variable would be outputted and not the memory address.
*p1 will display the variable because that is what it is pointing to.
Re: Pointers
October 04, 2007 03:20PM
Oh yeah.....correct me if I am wrong ... but a pointer can be stored only in a variable of type pointer?

e.g.

double *p, salary;
p = &salary

//therefore
salary = 90000;

//makes p equal to 9000

Right tracey?
Re: Pointers
October 04, 2007 04:08PM
Yes, I think that's right!
Re: Pointers
October 12, 2007 07:26AM
Tracey - having the statement cout << &p should print out the address. * = pointer while & = address of
Re: Pointers
October 12, 2007 08:01AM
oh yes, oops.
Sorry, only registered users may post in this forum.

Click here to login