hey guys i have segmentation fault within this code somewhere what is the problem does anyone know? I dont think there is any memory leaks
Code:/**************************************************************************** * COSC1098/1283 - Assignment #2 - Tennis Store * Programming Principles 2A/Programming Techniques * Author : <insert name here> * Student Number : <insert student number here> * Yallara Username : <insert username here> * Start up code provided by Steven Burrows - [email protected] ****************************************************************************/ #include "ts.h" #include "ts_utility.h" #include "ts_options.h" /**************************************************************************** * Function readRestOfLine() is used for buffer clearing. Source: * https://inside.cs.rmit.edu.au/~pmcd/teaching/C-Prog/CourseDocuments/ * FrequentlyAskedQuestions/ ****************************************************************************/ void readRestOfLine() { int c; /* Read until the end of the line or end-of-file. */ while ((c = fgetc(stdin)) != '\n' && c != EOF) ; /* Clear the error and end-of-file flags. */ clearerr(stdin); } /**************************************************************************** * Initialises the system to a safe empty state. ****************************************************************************/ void systemInit(TennisStoreType* ts) { } /**************************************************************************** * Loads all data into the system. ****************************************************************************/ void loadData(TennisStoreType* ts, char* customerFile, char* stockFile) { /* declaration of variables*/ char* stockID; char* description; char* custID; char* surname; char* firstname; char* address; char* suburb; double unitprice; int stocklevel; int postcode; int phone; } /**************************************************************************** * Deallocates memory used in the program. ****************************************************************************/ void systemFree(TennisStoreType* ts) { }