From c5dec7f7040e0bbe2edea0fb6a36e4de1c41ca0d Mon Sep 17 00:00:00 2001 From: fdai7057 Date: Fri, 3 Feb 2023 18:24:10 +0100 Subject: [PATCH] Add preprocessor directives in four header files. --- src/createCustomer.h | 3 +++ src/customerProperties.h | 3 +++ src/loginCustomer.h | 3 +++ src/stringManipulation.h | 3 +++ 4 files changed, 12 insertions(+) diff --git a/src/createCustomer.h b/src/createCustomer.h index 82eeee8..25769d5 100644 --- a/src/createCustomer.h +++ b/src/createCustomer.h @@ -1,3 +1,5 @@ +#ifndef CREATE_CUSTOMER_H +#define CREATE_CUSTOMER_H #include #include #include @@ -7,3 +9,4 @@ int generateID(); void collectCustomerProperties(); void writeCustomerPropertiesToFile(customer_t *); +#endif diff --git a/src/customerProperties.h b/src/customerProperties.h index c5d6b3e..0e3bb72 100644 --- a/src/customerProperties.h +++ b/src/customerProperties.h @@ -1,3 +1,5 @@ +#ifndef CUSTOMER_PROPERTIES_H +#define CUSTOMER_PROPERTIES_H typedef struct Customer { unsigned int ID; @@ -6,3 +8,4 @@ typedef struct Customer char *forename, *surname; float balance; }customer_t; +#endif diff --git a/src/loginCustomer.h b/src/loginCustomer.h index 5d15599..9fd921b 100644 --- a/src/loginCustomer.h +++ b/src/loginCustomer.h @@ -1,3 +1,5 @@ +#ifndef LOGIN_CUSTOMER_H +#define LOGIN_CUSTOMER_H #include #include #include @@ -8,3 +10,4 @@ bool checkLogin(bool); void collectCustomerDataForLogin(int); bool loginCustomer(customer_t *); +#endif diff --git a/src/stringManipulation.h b/src/stringManipulation.h index 82e39cb..38cf8aa 100644 --- a/src/stringManipulation.h +++ b/src/stringManipulation.h @@ -1,3 +1,5 @@ +#ifndef STRING_MANIPULATION_H +#define STRING_MANIPULATION_H #include #include #include @@ -8,3 +10,4 @@ char *generateCheckString(unsigned int, char *); unsigned int toUnsignedInteger(char *); unsigned int power(unsigned int, unsigned int); bool everyCharacterIsDigit(char *); +#endif