title: what does this stanford lirbrary mean? C++ simpio.h getInteger()
body: <p>i'm trying to understand this library that stanford uses for their CS course but i can't just use this feature in my CS course back in my home.  How do i emulate this feature? i was wondering is this a getline(cin, integer)?  or is this something to do with fstream?  The reason being, i'm trying to go through the lecture series at UDEMY.  </p>
  
  <p>Here is the definition.</p>
  
  <blockquote>
    <p><code>int getInteger(string prompt = "");</code></p>
    
    <p>Reads a complete line from <code>cin</code> and scans it as an integer. If the scan
    succeeds, the integer value is returned. If the argument is not a
    legal integer or if extraneous characters (other than whitespace)
    appear in the string, the user is given a chance to reenter the value.
    If supplied, the optional prompt string is printed before reading the
    value.</p>
    
    <p>Usage:</p>
    
    <p><code>int n = getInteger(prompt);</code></p>
  </blockquote>