Like CommonTater, I did not find a problem by inspection. However, I compiled your program with compiler warnings turned on, upon which the problem was obvious from the compiler's warning. This:Originally Posted by themolejoel
should have been:Code:scanf("%lf", ptrCar->price);
Moral of the story: compile with warnings turned on to a sufficiently high level.Code:scanf("%lf", &ptrCar->price);