im about to code a small application for myself. I have a code prepared. It looks something like this.
ifstream file("input.txt");
if (file.is_open())
{
string myArray[5];
for (int i = 0; i < 5; ++i)
{
file >> myArray[i];
}
cout << myArray;
}
Can somebody say how to get the words from the input.txt into an array? (Content of my txt file: "Bla Bla Bla") but the array just contains random numbers..
Kind regards