So this is an easy one I'm sure. I've Googled around and tried some thing but haven't got anywhere so I'm turning to the experts.
I have a file. The file has a word and then a new line and then another word so:
Dog
Cat
House
I want to read a line from that file and add it to a string array so I can read it back later one word at a time. I'm basically creating a dictionary. Hence the name of the function.
This is a part of the function where I read back the first 5 words in the string.
1 2 3 4 5 6 7 8 9
std::wcout << "Dictionary Loaded" << std::endl;
std::wcout << "First 5 dictionary entries:" << std::endl;
for (int i = 0; i <= 5; i++)
{
std::wcout << std::to_wstring(i) << ". " << Dictionary[i] << std::endl;
}
std::wcout << "Press any key to continue" << std::endl;
Console::ReadKey();
Valid = true;
Currently the program works but it only reads in one letter at a time per line vs the whole line. So the output from the lower function looks like:?
1.D
2.o
3.g
4.C
5.a
Can someone help me clear this up so that I get the whole word?: Thanks