It's UWAweek 42 (2nd semester, week 12)

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


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

Login to reply

👍?
helpful

"Seoyoung Park" <23*0*6*4@s*u*e*t*u*a*e*u*a*> wrote:
> Hi, > > In Project 1, we were instructed to specify the operating system we used, but there is no mention of this in the Project 2 instructions. Should we still indicate which OS we are working on, such as macOS or Linux? > > Additionally, my partner and I are facing a segmentation fault during testing, but we’re unsure of the cause since it works fine on my laptop. > I’m using an Intel MacBook, while my partner is using an M2 MacBook. > Could the difference in hardware be the reason for the segmentation fault? > We didn’t encounter any issues in Project 1 fyi. > > Thanks in advance.
When constructing your array of pointers to structures did you make sure to malloc memory to them before accessing their contents? Segfault means you are going out of bounds in memory. If malloc wasn't used the pointer points to nothing (no memory) so it will instantly segfault if you access its contents.

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  8:08AM Aug 25 2024
Privacy policy