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


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported

Login to reply

👍?
helpful
5:40am Sat 3rd Sep, Christopher M.

ANONYMOUS wrote:
> It seems to be working now, I think, as the error isn't appearing. On another note, how do we know that our file has been read? I'm using sscanf() to read the crontab file but the program doesn't return anything. When I use sscanf(), I'm inputting the desired format as a string but the individual values are ints, so when I'm assigning each value of the string to a struct value, it doesn't work (because from char to int). Can someone please help me with this? Thank you.
Glad that you've made progress, although your explanation of why(?) doesn't build confidence that you've really fixed it. Segmentation faults nearly always occur when accessing memory that you process doesn't own, typically by accessing an array outside of its declared dimensions. However, I don't know what you're asking "...how do we know that our file has been read?". You've written the code to *read* the (lines of a) file. Why do you think that those lines are not working? Are any of this elines function calls which probably return an indication of any 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  1:17AM Sep 14 2022
Privacy policy