I have two things that I cannot figure out. I know I'll kick myself when I see what they should be.

How do I assign the value pointed to by "sSaverPtr" to the variable "filled"? "sSaverPtr" points to a long int.

And how would I then go about printing the address stored in "sSaverPtr" ?


I can't figure these couple of things out for anything and I know there can't be much of anything to either of them.


-Clifton

Recommended Answers

All 3 Replies

cout << pointer;

That's what I use usually.

sSaverPtr -> data = filled;

Using a struct to form a linked list.

sSaverPtr -> data = filled;

Using a struct to form a linked list.

I think he meant doing something like:

*sSaverPtr = filled;

Which dereferences whatever sSaverPtr points to, and changes the stored value there to filled.

-Fredric

Alright, thanks guys!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.