Oddly enough though, the problem wound up being on line 10, I forgot to put a semicolon at the end of the function prototype. I did post the compiler messages I was receiving they are in my message above the code. It was giving me the typical message about contacting Windows for a fix and then shutting down! I know, very odd, but it definitely wasn't the compiler diagnostics. Thank you for the reply Actually, my program was literally crashing when I tried to run it. Note that the line numbers in your editor may be different than what's on the screen here.Hello.
For example, if your compiler says there is a problem on line 24, you probably should post lines 20-30 in code tags here in the message. If you can't figure it out, post the error message here along with the relevant context. What you need to do is go to the indicated line numbers and try to figure out what the problem is and correct it. Breakpoints may also be toggled with a left click in the left editor margin. Right click the variable to set a watch in the Watch Window. Run the debugger until the breakpoint is reached. Those are called compiler diagnostics, and they tell you where they've identified problems. Set a breakpoint in a position that will allow you to observe the variable value.
*pennies = (total - (*quarters * 0.25)-(*dimes * 0.10)-Ĭould someone please give me some idea why this is now crashing my compiler and not running when it worked before? Thanks in advance. Printf("\nTotal value entered: $%0.2f\n", total) Printf("\n\nEnter the amount money in change that you are carrying:\n") Printf("\nTotal value: $%0.2f\n", total)
Void change (float total, int *quarters, int *dimes, int *nickels, int *pennies)Ĭhange(total, &quarters, &dimes, &nickels, &pennies)