By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,194 Members | 854 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,194 IT Pros & Developers. It's quick & easy.

Finding a specific string in an array of strings

P: 2
Hey Folks, I'm looking for some help here.
My talks entails reading in book titles from a single text file and assigning them to an array of strings.
I have this part working fine with each word being assigned to a different array index.

I am however stuck on a task whereby the user can input a title and it's required to search the string array for that title and return the title stating that it is in stock.

Any and all help is appreciated.
Mar 8 '07 #1
Share this Question
Share on Google+
2 Replies


sicarie
Expert Mod 2.5K+
P: 4,677
Hey Folks, I'm looking for some help here.
My talks entails reading in book titles from a single text file and assigning them to an array of strings.
I have this part working fine with each word being assigned to a different array index.

I am however stuck on a task whereby the user can input a title and it's required to search the string array for that title and return the title stating that it is in stock.

Any and all help is appreciated.
Where are you stuck? Is it on a specific syntax issue, or an algorithmic issue? Have you looked at (if this is C++ - I can't remember if it's in C or not) strtok() ?
Mar 8 '07 #2

P: 2
Where are you stuck? Is it on a specific syntax issue, or an algorithmic issue? Have you looked at (if this is C++ - I can't remember if it's in C or not) strtok() ?

It's ok, the problem's been solved via use of a single string and the == operator.
Mar 8 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.