I want to be able to make this code read those two lists from an external .txt file from my desktop for example. This will make it so I can read larger amount of words instead of having to paste them all in this script.
I could have an input.cpp, dictionary.cpp, and an output.cpp where all matched up names are printed out. Could this be done? I would really appreciate some help!
I can't find anything anywhere on how to go about doing this. I have an idea how to do this in JAVA but that would be entirely too slow. C++ is the way to go. If anyone could help me out please do so, it would be much appreciated.
I'm new to C++, brand new. I understand I should have read some books and took some classes but I am in a situation where I need a project done quickly with the very little knowledge I know. I can follow and understand the tutorials fine but when it goes to putting it into my script I don't know how to re-write my current script and how to deal with the errors.
Do you understand what I'm saying though about having the script I have now read an external .cpp file with a list of words in it then having them match up words in ANOTHER .cpp file and discard of any that didn't match up by not printing them to an output.cpp.
I pretty much need help rebuilding my whole current code and making this possible. I tried and I can't seem to get it to want to write the words it matched up in the 'dictionary' from list1 into an outpost file. I don't know how to make it know to do that.
Sorry, the header is <fstream>. (You could have checked the reference documentation on this site; search with std::ifstream.)
Each process has a current working directory (cwd). Filenames with non-absolute paths are relative to cwd. I have no idea how Windows GUI sets cwd for a process.
and have it creating an outpost.txt file now but I can't seem to make it actually print the outputted text into the file. After I'm done running/building it a few words I put into input.txt and dictionary.txt were printed out into CMD but not into the output.txt
Is that why it's not printing the text out into output.txt?
I am really confused to why it's not. The only alternative I can think of is find a way for it to print out the output from CMD into a .txt from there.
But I would rather just do it the right way.
Why is my output.txt file remaining blank but CMD has a list of printed out words? Could you fix my code maybe?
I'll start a new thread regarding my current issue since I no longer need it to read from external .txts. I figured that out thanks to everyone who helped.