Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Program Create A main.h header file that contains all compiler directives and C++ declarations for your program. Remember that header files should not contain

C++ Program

Create

A main.h header file that contains all compiler directives and C++ declarations for your program. Remember that header files should not contain any executable statements or result in any memory allocations.

A main.cpp source code file that contains all of the executable statements for your program. Your main.cpp file may contain the #include for the main.h file but no other #include statements.

A makefile used by the make that will compile your source code file(s) into an executable file named main.

This program focuses are arrays of struct's, and struct's that contain array members. The goal of this program is to create a keyword index for a text input file.

Functional requirements for your program:

Accepts an input file name from the user If the input file can not be opened, display an appropriate message and end the program.

For each distinct word in the file, display a list of the line numbers where the word appears Words in the list should be displayed in alphabetic (ASCII) order, and line numbers for a word should be displayed in ascending order.

Each distinct word should appear only one time in the list, and each line number should appear only one time for each word.

PLEASE DO NOT USE MAP OR VECTOR, I HAVEN'T SEEN THEM YET!!!!!!!!!!!!!!

USE LINUX SYSTEM. I NEED HEADER FILE AND MAIN FILE!!!!!!!

FOCUS ON ARRAYS OF STRUCT'S AND ARRAY MEMBER!!!!!!!!!!!!!

output example:

Assignment appears on lines 0

here appears on line 0,1,2

for appears on lines 2,3

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

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

Understand the different approaches to job design. page 167

Answered: 1 week ago