inputting an integer string in c++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stile213
    New Member
    • Oct 2006
    • 1

    #1

    inputting an integer string in c++

    What's the easiest way to input an integer string using the cin function? The string will be single digits and from 1 to 5 elements long.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    int x;
    cin >> x;


    Simplest but not very robust.

    Comment

    Working...