Before I start please keep in mind that I am still learning and need help with some stuff that may be easy to you but not to me. So here we go. I am having trouble using scanf in a custom function. It will not let me type anything. It just keeps running forever unless I stop it. How can I get scanf to work here:
#include <stdio.h>
#include <stdlib.h>
void function ();
int main (void)
{
char sel;
function ();
return 0;
}
void function ()
{
scanf("%c",&sel);
}