IT
창크기 알려주는 프로그램
kio467
2014. 10. 8. 16:28
#include <stdio.h>
#include <sys/ioctl.h>
int main()
{
struct winsize wbuf;
if(ioctl(0,TIOCGWINSZ,&wbuf)!=-1)
printf("%d rows x %d cols\n",wbuf.ws_row, wbuf.ws_col);
return 0;
}