Hi all, i asked this question a few days ago bit its still unsolved.
I'm reading a text file of strings, line by line, and storing them into an array.
when i try and print them using this function:
template < typename T >
void printArray(T * const array, int size)
{
for (int i=0; i < size; ++i)
{
cout << array[i] << ' ';
cout.flush();
}
cout << endl;
}//printarray
it dosn't print the whole array.
when i use endl or '\n' instead of ' ' it works.
and it can't be the cout buffer because im using cout.flush().
Does anyone know what is happening.