Automatically generate struct instances
问题 Lets say the struct is defined as : struct car { int registration_number; } I want to generate a specific number of struct instances as specified by the user. Enter number of cars: 20 #generate 20 struct instances I do not want to make an array inside struct but want a separate instance for every car. I cant understand what the protocol is to automatically generate instances. car1,car2,car3......,car n I thought I would run a loop but I cant understand how to declare new instance name