Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- int main(int argc, char *argv[])
- {
- CONSOLE_SCREEN_BUFFER_INFO csbi;
- int columns, rows;
- GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
- columns = csbi.srWindow.Right - csbi.srWindow.Left + 1;
- rows = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
- printf("columns: %d\n", columns);
- printf("rows: %d\n", rows);
- return 0;
- }
Add Comment
Please, Sign In to add comment