I'm trying to create a graph and I need to know the size of the window the user is running the code in. I'm trying to scale the data so the data shows only on the size of the window, without wrapping or scrolling. I'm on windows but I want to use something similar to Linux equivalent
int lines = atoi(getenv("LINES") ;
int cols = atoi(getenv("COLUMNS") ;
So I can scale numbers and show a graph like this
320 a ============================================================
160 b ==============================
80 c ===============
40 d =======
20 e ===
10 f =
5 g
2 h
1 i
2 j
17 k ===
41 l =======
67 m ============
97 n ==================
127 o ========================
157 p =============================
191 q ====================================
227 r ===========================================
257 s ================================================
283 t =====================================================
331 u ==============================================================
367 v =====================================================================
373 w ======================================================================
379 x ========================================================================
383 y ========================================================================
389 z ==========================================================================
Is there something that will work on Windows and Linux? I'm using Visual Studio 2012.