A simple ticket booking system implemented in C that allows users to add and display bookings. The system saves the booking details to a binary file for persistent storage.
- Features
- Requirements
- Installation
- Usage
- Code Structure
- Contribution Guidelines
- General Rules
- Getting Started
- Avoiding Conflicts
- Add Booking: Users can enter details for new bookings, including ticket ID, name, destination, and price.
- Display Bookings: Users can view all the current bookings in a formatted table.
- File Storage: Booking details are saved to and loaded from a binary file (
bookings.dat
), ensuring data persistence between sessions. - User-Friendly Menu: An interactive menu allows users to easily navigate between adding bookings and displaying them.
- C Compiler (e.g., GCC)
- Basic understanding of C programming
-
Fork the repository:
Use the fork button at the top right of the repository page.
-
Clone the forked repository:
git clone https://github.com/your-username/ticket-booking-system.git cd ticket-booking-system
-
Compile the program:
gcc -o booking booking.c
-
Run the compiled program:
./booking
-
Follow the on-screen menu to add bookings or display existing ones.
-
Build the Docker image:
docker build -t ticket-booking-system .
-
Run the Docker container:
docker run -it ticket-booking-system
- ticket_booking_system.c: The main source file containing the implementation of the ticket booking system.
- bookings.dat: A binary file used for storing booking details (automatically created/updated by the program).