It's UWAweek 48

help2002

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 3 other people reading this forum.


 UWA week 36 (2nd semester, mid-semester break) ↓
SVG not supported

Login to reply

👍?
helpful
3:37pm Wed 7th Sep, Gihad C.

Sorry I'm still not quite clear on this; what would you effectively be asking the compiler/processor to do if you just passed endptr instead of &endptr to strtol? If endptr was a simple char and we wanted to change its value, I understand you'd have to pass &endptr for its new value to be set to the char returned by the function. And ultimately we want endptr to point to a char, so why not declare "char endptr" instead of "char* endptr" and pass its address "&endptr"? will this not also result in the function changing the value of endptr to the char at the end of the input string?

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