Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with the following c++ program I am learning how to use command line arguments while learning how to use vectors, dynamic arrays

I need help with the following c++ program

I am learning how to use command line arguments while learning how to use vectors, dynamic arrays and linked lists

I want to do a program that does the following:

1. reads a text file and stores the input either in an array, vector or a linked list

2. the type of storage is decided by th user where if entered:

./a.out file.txt vector (then the file is stored in a vector)

or

./a.out text.txt array (then the file is stored in an array)

or

./a.out text.txt linked (then the file is stored in a linked list)

or

./a.out text.txt (in this case since no type is entered than automatically the file is stored in an array)

3. the array must be dynamically allocated

4. the linked list can be singly or doubly it is up to you

5. the first line in the file should be disregarded and not stored in the linked list, array or vector.

this is the text file:

use this list (skip first lines and start with Hello)

Emma

Olivia

Ava

Isabella

Sophia

Charlotte

Mia

Amelia

Harper

Evelyn

Abigail

Emily

Elizabeth

Mila

Ella

Avery

Sofia

Camila

Aria

Scarlett

Victoria

Madison

Luna

Grace

Chloe

Penelope

Layla

Riley

Zoey

Nora

Lily

Eleanor

Hannah

Lillian

Addison

Aubrey

Ellie

Stella

Natalie

Zoe

Leah

Hazel

Violet

Aurora

Savannah

Audrey

Brooklyn

Bella

Claire

Skylar

Lucy

Paisley

Everly

Anna

Caroline

Nova

Genesis

Emilia

Kennedy

Samantha

Maya

Willow

Kinsley

Naomi

Aaliyah

Elena

Sarah

Ariana

Allison

Gabriella

Alice

Madelyn

Cora

Ruby

Eva

Serenity

Autumn

Adeline

Hailey

Gianna

Valentina

Isla

Eliana

Quinn

Nevaeh

Ivy

Sadie

Piper

Lydia

Alexa

Josephine

Emery

Julia

Delilah

Arianna

Vivian

Kaylee

Sophie

Brielle

Madeline

Peyton

Rylee

Clara

Hadley

Melanie

Mackenzie

Reagan

Adalynn

Liliana

Aubree

Jade

Katherine

Isabelle

Natalia

Raelynn

Maria

Athena

Ximena

Arya

Leilani

Taylor

Faith

Rose

Kylie

Alexandra

Mary

Margaret

Lyla

Ashley

Amaya

Eliza

Brianna

Bailey

Andrea

Khloe

Jasmine

Melody

Iris

Isabel

Norah

Annabelle

Valeria

Emerson

Adalyn

Ryleigh

Eden

Emersyn

Anastasia

Kayla

Alyssa

Juliana

Charlie

Esther

Ariel

Cecilia

Valerie

Alina

Molly

Reese

Aliyah

Lilly

Parker

Finley

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

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions