Note that there are some explanatory texts on larger screens.

plurals
  1. POC++ How to get the window size (width and height)?
    primarykey
    data
    text
    <p>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</p> <pre><code>int lines = atoi(getenv("LINES") ; int cols = atoi(getenv("COLUMNS") ; </code></pre> <p>So I can scale numbers and show a graph like this</p> <pre><code>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 ========================================================================== </code></pre> <p>Is there something that will work on Windows and Linux? I'm using Visual Studio 2012.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload