Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- #include<sys/ioctl.h>
- #include<unistd.h>
- #define Alto X.ws_row
- #define Ancho X.ws_col
- void main(){
- struct winsize X;
- for(;;){
- ioctl(0, TIOCGWINSZ, &X);
- printf("Alto:\t%i\nAncho:\t%i\n\n", Alto, Ancho);
- sleep(1);
- system("clear");
- }
- }
Add Comment
Please, Sign In to add comment