It's UWAweek 30 (2nd semester, week 1)

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 1168 articles.
Currently 13 other people reading this forum.


 UWA week 42 (2nd semester, week 12) ↓
SVG not supported

Login to reply

👍x1
helpful
1:35pm Tue 17th Oct, Christopher M.

ANONYMOUS wrote:

Hi Chris,

Out of curiosity, is there a difference between using fprintf and using perror for error handling? Is there an option we should opt for?

They have different roles.

The more familiar fprintf() allows you to print anything you want.

In contrast, perror() prints system-level error messages in a standard and consistent format. But it can only do that if the current value of errno reflects the most recent error, and not all functions set errno when detecting errors.

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  7:24AM Jul 25 2024
Privacy policy