Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,545 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,576 people online right now. Registration is fast and FREE... Join Now!




Reading a file into C++

 
Reply to this topicStart new topic

Reading a file into C++, Help finding longest word from another file.

jingoria
25 Nov, 2007 - 04:49 PM
Post #1

New D.I.C Head
*

Joined: 22 Oct, 2007
Posts: 41


My Contributions
Hi,
I need some help in writing a program that would read a .txt file that consists of some words and then displays the longest word on the screen.

Here is the prompt for more clarity:

Write a program that reads this file and finds the longest word that contains only a single vowel (a, e, i, o, u). Output this word (there will actually be several ties for the longest word. Your program only needs to output one of these words).

My question is, how would I say the program to count the length of the words and display the longest of all?

Please reply soon.
thanks.
User is offlineProfile CardPM
+Quote Post

Trogdor
RE: Reading A File Into C++
25 Nov, 2007 - 04:59 PM
Post #2

D.I.C Addict
Group Icon

Joined: 6 Oct, 2006
Posts: 549



Thanked: 4 times
Dream Kudos: 125
My Contributions
man homework
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/7/09 09:31PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month