Hello,
I have some minor problems using tcichars with stdin. I use:
if(tcichars(stdin) == -1)
{
// error
}
else
{
// do something
}
…and I always get an error (-1) and error code is 9 what means EBADF.
Can you help me a little?
Thanks in advance.
Best regards,
Darius
Hi,
tcischars needs a fildes, not a FILE *,
try instead
tcischars (fileno (stdin))
Best regards
Darius wrote:
Hello,
I have some minor problems using tcichars with stdin. I use:
if(tcichars(stdin) == -1)
{
// error
}
else
{
// do something
}
…and I always get an error (-1) and error code is 9 what means
EBADF. Can you help me a little?
Thanks in advance.
Best regards,
Darius
Hello,
tcischars (fileno (stdin))
Thanks, this seems to be working without any problems.
Best regards,
Darius