1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Deconstructing user-inputted string and comparing each word to the array

Discussion in 'C++' started by unsureandunclea, Sep 7, 2010.

  1. unsureandunclea

    unsureandunclea New Member

    Joined:
    Sep 7, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    i'm currently creating a program that allows the user to input a sentince and then the program compares each word to the array to see if there is any matches. The program also is able to sort using quicksort and other sorts. however, i am not sure how to deconstruct user inputted data and compare it to the array.

    Any Help would be great :)
     
  2. techgeek.in

    techgeek.in New Member

    Joined:
    Dec 20, 2009
    Messages:
    572
    Likes Received:
    19
    Trophy Points:
    0
    Occupation:
    EOC (exploitation of computers)..i m a Terminator.
    Location:
    Not an alien!! for sure
    Home Page:
    deconstructing is easy..u just need to consider the "space" as a character of separation between two diff words in a sentence...traverse the whole sentence and store the words in a 2-d array character by character when "space" condition is checked.
     

Share This Page