☰
d2jsp
Rules
Help
Forum Gold FAQ
Live Streams
Photo Gallery
Hourly Raffle
Ladder Slasher
Log In
Register
Log In
Register
Account Recovery
Resend Validation Email
d2jsp Forums
>
Off-Topic
>
Computers & IT
>
Programming & Development
> How Would I Do This?
Add Reply
New Topic
New Poll
Views: 401
Replies: 2
Track Topic
ferf
Member
Posts: 31,371
Joined: Mar 25 2009
Gold
:
15.00
#1
Jan 3 2021 07:55pm
So i wanna read a text file for the most common word? and display how many times it was used....
BUT i don't wanna do it line for line, i wanna do the entire text file, then figure it out
I did this also in line for line using hashmap, but now i wanna do it with the entire file rather then line for line, hopefully this makes sense!
JP99
Member
Posts: 24,497
Joined: Sep 22 2007
Gold
:
50.69
#2
Jan 4 2021 07:34pm
This seems like an obvious answer but without original code idk, but instead of reading to EOL in loop, just read until EOF?
ferf
Member
Posts: 31,371
Joined: Mar 25 2009
Gold
:
15.00
#3
Jan 4 2021 09:47pm
Quote (JP99 @ Jan 4 2021 09:34pm)
This seems like an obvious answer but without original code idk, but instead of reading to EOL in loop, just read until EOF?
Ah yes that'd make sense, ty!
Go Back To
Programming & Development
Topic List
Add Reply
New Topic
New Poll
© 2003-2024 d2jsp
Contact