Reputation: 91
I am working on a program for class. The program compiles but when I enter a value for length a window pops up saying "Pipeprogram.exe has stopped working". It then goes on to say "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available".
So far with a couple of google searches I have found no solution. If anyone could help out it would be appreciated.
Upvotes: 0
Views: 8320
Reputation: 184
You need to pass a pointer to scanf, using an &. So,
scanf("%f", &length);
Upvotes: 5