ok, i dont know anyone who can help me. i've been trying to fill a 2-d array for a while now and all i have is this.
int FillArray (string a, string b[][6])
{
int x = 0;
ifstream file;//ofstream
file.open((a+".txt").c_str());
//file.open(a.c_str());
if (!file.is_open())
{
cout << "could not open" << endl;
return -1;
}
i dont know if it works, but even if it does, it will only fill the boxes with lines and i need it in individual characters.
someone i know said to fill a string and then read the string into a for loop, but i dont know how to do that. i mean, i dont really know how to fill an array with a line from a text document.
@xsemel
Sorry, no, I don't. I've just learned how to fill arrays, int and char characters. Hopefully others that are far more knowledgeable in these matters can give pointers to you.