how would you write a string stream from multiple txt files to change key words from each array? I'm sorry if my wording is bad i am very new to this and just trying to figure things out any help would be very appreciated thank you!!
i have multiple files i have to read the sentence files to the screen and i need to change key words(colors) in that file to the matching color in the color file which will read out another phrase from the phrases file associated with the color from the color file..
i hope that makes any sense at all!!
im sorry i am so lost i dont really know how to explain what im doing.
What I'm asking for is an example of an input file, example of the color file, example of the phrases file, and example of the output produced once you do some operation on those files.
Otherwise, I'll just be wasting time trying to guess what the actual requirements are.
Here's an example of reading in a file, replacing some colors in it with phrases, and writing out the file again. Maybe it'll help you get some ideas.
Alright, what you said there makes some sense Ganado. I'm working on this VERY SAME project with OP, so I'll add some more detail here. We were given these .txt files, Colors.txt and Sentences.txt where the USER inputs some words or whatever, and if one of the colors from the Colors.txt file is entered, it's replaced with the corresponding phrases in the Phrases.txt file.
1 2 3 4 5 6 7
red
blue
green
yellow
black
white
brown
1 2 3 4 5 6 7
expensive and elegant
gigantic yet gentle
beautiful and rich
sunny and warm
glittery with diamonds
massive and stupid
fast and agile
Are what the Colors.txt and Phrases.txt files contain respectively. We were asked to use arrays here instead of vectors, so the function that OP has in the first post are supposed to have arrays passed in. Yeah I'm just as lost as he is lol