Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C++ Reading Strings

Name: Anonymous 2014-02-25 20:28

Hi guys, I'm practicing writing C++ and trying to recall how to read individual characters from a user-input string of characters.  Couldn't I use cin.getline?

Name: Anonymous 2014-02-25 20:32

Wait - doy, I'm dumb.  I could just use cin.get to read each individual character.  I could treat the string as an array using indices to insert each character into the array's elements.
Feel free to delete this thread - I think I get it now.

Name: Anonymous 2014-03-11 7:07

Name: NSA targets sysadmins 2014-03-12 11:20

fucking murrica

Name: Anonymous 2014-03-24 11:28

Why not just use std::cin >> inputName; and read that like an array?

Don't change these.
Name: Email:
Entire Thread Thread List