How to input integer in c++ without using ">>"
<p><strong>My Question/Problem:</strong><br/>
Right now my program is using <code>cin &gt;&gt;</code> to get input and thats working fine except for I need to use <code>getline()</code> at one point and I know I shouldn't mix things like <code>getline()</code> and <code>cin.get()</code> with <code>cin &gt;&gt;</code>. <strong>How do I input an integer without using <code>&gt;&gt;</code>?</strong></p>

<p><strong>Research:</strong><br/>
I've tried to research this, but every result I find says to use <code>cin &gt;&gt;</code> <a href="https://stackoverflow.com/questions/13421965/using-cin-get-to-get-an-integer">This is the closest I've found.</a></p>

<p>I would be just as happy to find a way to avoid using <code>getline()</code>.</p>