I am writing a small program that requires the user to input a char on two occasions. The two functions below are called one after the other in main().
The code compiles with no errors, and runs fine with one exception: The first scanf() fires but does not wait for the user to input their text. Instead, here is what I am seeing in the terminal:
float getShares(float number)
printf( "Enter shares cap: " );
scanf( "%c", &sharesCap );...
float getEarnings(float number)
printf( "Enter earnings cap: " );
scanf( "%c", &earningsCap );...
"Enter shares cap: Enter earnings cap: "
The first scanf() doesn't wait for me to enter a character. What gives? Is this a common problem? Solutions???