Actually you posted this:
You told me to increment it once more when I was already incrementing it once after the j loop.
Ok, I can understand how that could be interpreted differently. I meant:
for( over the i's)
{
for (over the j's, incrementing k also)
{
}
//we've gone through one cycle of j's, so we've found a word
k++; //now increment
}
Hmm alright, do I put that bit of code within the for loop or in the place where I'm incrementing k but just before it. Also, what does this bit of code do exactly? I haven't come across something like std::cout while I'm learning C++.
That's how cout and endl are written with their fully qualified name. In standard C++ namespaces are used to allow you isolate two functions/classes/etc. that might have the same name. I suspect you might be using a prestandard compiler. Cout, endl, cin, etc. are all under the namespace "std." So, if I create a my own cout method under the namespace jonsca, then I can use jonsca::cout and std::cout to tell the difference. Some people use a "using" statement to bring all of the members from one namespace into the global namespace (like using namespace std;
)
So, you know what cout and endl are for, see if you can find a good spot in your code to output what you've just assigned to your array.