Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ I am trying to sort a .txt file by individual words and store the words in a char array, so I can later sort
C++
I am trying to sort a .txt file by individual words and store the words in a char array, so I can later sort the words in ASCII order.
the text file looks like this:
"input.txt"
This This This
is a line
is a line
done
This
line
My goal is to get the individual word, and compare it to my "keyword index" so that will just state the word once, and how many times it occurs.
so the output would look like
"This" 4 times
"line" 3 times
etc...
The trick is I am trying to do it with c-string (so just char arrays) and not , which I know would be much easier.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started