Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

What is the preferred personality?

Answered: 1 week ago