How to Scan Strings

This is a discussion on How to Scan Strings within the C++ Programming forums, part of the General Programming Boards category; Hey I was just wondering how one would be able to scan a string for certain words. Example: I ask ...

  1. #1
    The Maverick Programmer
    Join Date
    Jan 2005
    Posts
    10

    How to Scan Strings

    Hey I was just wondering how one would be able to scan a string for certain words. Example: I ask the user for a long sentence, a long static string, and based on the context of the input, the program could give certain output. I'm just curious to know as to how this is done.
    Conformity in the Code is a Calculated error in Compilation.

  2. #2
    Registered User Sake's Avatar
    Join Date
    Jan 2005
    Posts
    89
    What you're talking about is called parsing. It's a broad practice, and how you go about it really depends on the format of the string. What kind of input are you expecting and how do you plan on using it? When you describe requirements, it's okay to assume that everything "just works", of course.
    Kampai!

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, 07:37 AM
  4. menus and strings
    By garycastillo in forum C Programming
    Replies: 3
    Last Post: 04-29-2002, 12:23 PM
  5. Replies: 0
    Last Post: 02-21-2002, 06:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21