PLEASE NOTE: the upgrades to this server,, have not yet been completed.
Hopefully the changes will be completed on THURSDAY 8th December.
Web-based programs, such as csmarks, cssubmit, and the help fora, will be unavailable at some time on Thursday 8th.
  It's UWAweek 49


This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Displaying selected article
Showing 1 of 919 articles.
Currently 2 other people reading this forum.

 UWA week 40 (2nd semester, week 10) ↓
SVG not supported

Login to reply

3:59pm Wed 5th Oct, Christopher M.

"Zhuo Hu" <23*0*3*[email protected]*u*e*t*u*a*e*u*a*> wrote:
> and I'm stuck on how to store pointers, not to mention how to store so many pointers inside another pointer. I tried to google this question, but it is not much help.
It's possible (easy) to store the value of a pointer in a file - printf("%p\n", (void *)my_pointer ); BUT, you should re-think your approach. The value of a pointer is meaningful in a process that allocated/created it but, if written to a file, the pointer is extremely unlikely to have a correct meaning in another process reading it back in. The address space of each process, and the addresses where things are stored in one process are almost guaranteed to be different in another process. Even the same program, run twice, will 'get' different addresses. See - Rethink your approach to avoid storing pointers/addresses in the trove-file.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy