Hello Everyone!
Okay so I am studying a computing course and i am new to the C language. I have been given an assignment but i have no idea where to start, if anyone could provide any useful information/links or resources it would be greatly appreciated!
Below is a copy of what the assignment is asking for;
Files you will create & submit: frame.h, frame_manager.h, frame_manager.c, Makefile
frame.h - will contain the definition of a ‘Frame’ struct that contains two elements:
an int value called ‘data’ and a Frame pointer called ‘next’. Make sure to use a typedef
when defining your struct.
frame_manager.h - will contain two function prototypes used for creating and
destroying Frames (memory management). The signatures for these two functions are:
Frame* getFrame()
void releaseFrame(Frame* oldFrame)
frame_manager.c - will contain the definition for these two function prototypes
such that getFrame will allocate a new Frame in memory using calloc or malloc, and
return a pointer to the new allocation; and releaseFrame will reset ‘oldFrame’s values to
0 and NULL and free oldFrame’s memory.
Please submit a Makefile for your entire project as well. Make sure to use
CFLAGS = -Wall -Wextra –pedantic so that your compiler is extra picky.
Any solutions would be a life saver!
Thank you