Skip to content

NILESH8757/Parking-Lot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

Parking Lot

Note: This is a monolithic program not following any design patterns/standards. Intent to create this program was to get a up running parking lot software in minimal time.

How to run :

  • Download this main.cpp file.
  • Create 2 text files namely -> input.txt and output.txt in same directory as of main.cpp
  • Provide test case in input.txt file
  • Run main.cpp from terminal or any IDE
  • See the result/output in output.txt

To run on mac :

Compile using Clang $ g++ -o main main.cpp
Run the binary executable:
$ ./main

To run on Unix machine :


In case of Ubuntu it doesn't have C++ compiler by default. You need to install it by below command:

sudo apt-get install g++
Now you can compile your programs like this:

g++ main.cpp -o output
Now you can run the same with below command:

./output
Troubleshoting: By default g++ creates executable output. If in case you have permission denied error then try command:

chmod u+x output

Or run online hassle free:


comment out following line in main.cpp
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);

Go to ideone , paste code in editor
provide input and click run. That's it.

Sample Input :


Create_parking_lot 6
Park KA-01-HH-1234 driver_age 21
Park PB-01-HH-1234 driver_age 21
Slot_numbers_for_driver_of_age 21
Park PB-01-TG-2341 driver_age 40
Slot_number_for_car_with_number PB-01-HH-1234
Leave 2
Park HR-29-TG-3098 driver_age 39
Vehicle_registration_number_for_driver_of_age 18

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages