does anyone know how to make an array search for how many words are in it?
anthony5557 0 Light Poster
Recommended Answers
Jump to PostCan you give an example of what you mean ?
Jump to Postdoes anyone know how to make an array search for how many words are in it?
Yes... I do.
See the end of your last thread.
Jump to PostHave you debugged your code. You are getting only first word by cin>> Phrase; statement.
Why this is happening? Oh Cin delimits the string by SPACE . Ok, so
You need to get whole line first. Than search all space and count all words i.e. no of space + 1
All 9 Replies
mrnutty 761 Senior Poster
anthony5557 0 Light Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
anthony5557 0 Light Poster
ashishchoure 9 Junior Poster
pecet 1 Junior Poster in Training
adcodingmaster -8 Light Poster
hag++ 24 Junior Poster
mrnutty 761 Senior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.