Thread: Istream strings

  1. #1
    Registered User
    Join Date
    Oct 2004

    Istream strings

    Hi, just a quick one:

    can someone briefly sum up what istream strings and how to use them? I just cant seem to get my head around it!


  2. #2
    Registered User
    Join Date
    Mar 2002
    an istream is a stream to have data placed into your program. The most common istream used by beginners is cin, but you can declare your own istream if you wish. ifstreams are istreams specialized to read data from files.

    A string is a variable to hold characters. Each string has a terminal null character. There are several different versions of strings.

    However, I'm not sure what you mean by istream strings. If you are refering to a single entity there are things like istrstreams and istringstream and other critters running around the language, but I can't tell for sure what you are asking about. Can you try to rephrase your question?

  3. #3
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    String streams are something different. I'm feeling lazy today, so I'll refer you to another source for this info:
    The class template basic_istringstream reads from an array in memory. It supports reading objects of class basic_string, and uses a basic_stringbuf object to control the associated storage. It inherits from basic_istream, and therefore can use all the formatted and unformatted input functions.
    - Rogue Wave Documentation


    You can format strings nicely and easily with them.
    Last edited by Zach L.; 11-19-2004 at 09:14 AM.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strings Program
    By limergal in forum C++ Programming
    Replies: 4
    Last Post: 12-02-2006, 03:24 PM
  2. Programming using strings
    By jlu0418 in forum C++ Programming
    Replies: 5
    Last Post: 11-26-2006, 08:07 PM
  3. Reading strings input by the user...
    By Cmuppet in forum C Programming
    Replies: 13
    Last Post: 07-21-2004, 06:37 AM
  4. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM
  5. menus and strings
    By garycastillo in forum C Programming
    Replies: 3
    Last Post: 04-29-2002, 11:23 AM