TL; DR:
printf()printLotInfo()通过值时打印垃圾.
码
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <math.h>
#include <string.h>
typedef struct Time
{
int hour; //Hour of day
int minute; //Minute of hour
} Time;
typedef struct Car
{
char * plateNumber; //String to hold plate
char hasPermit; //True/False
Time * enteringTime; //Time Struct
int lotParkedIn; //Where is the car located
} Car;
typedef struct ParkingLot
{
int lotNumber; //Lot identifier
double hourlyRate; //$$/h
double maxCharge; //Maximum daily charge
int capacity; //How many …Run Code Online (Sandbox Code Playgroud)