> car *ptr = &catalogue[0];
What does this achieve?
You can do this
cin.getline(catalogue[i].make,20);
> delete [] catalogue;
You need to do this after you've finished printing the data, not before.
> however on the first run through the loop, the "make" of the car is not stored in the array
Maybe you typed a space after the input of how many cars
So the get() only got rid of the space, not the newline which would immediately satisfy the getline.
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Offline 7,164 posts
since Dec 2005