ive been thinking of ways to use getch() in a menu im makeing so i figured i'd try to use it first and made this:

int mian()
{
char test;
test = getchar();
if(test == a)
{
cout<<"Hello";
}
else
{
cout<<"Bye";
}
}

but when i run it when you press a it justs prints a like if u sed cout until you press enter is it something wrong with my code or my complier (Bloodshed Dev-C++ 4) or maybe i just think getchar does something different then it does.