The great space.

So I got it to output correctly but I'm getting a huge space before it does.
I got all the words to be there. But it's just that this space. Any ideas?

The file sorted alphabetically:


(a huge space)


assignment file or from i is is line miss
should test the third this this this this to

I don't know how to get rid of this space there is nothing that stands out as to why I would get this huge space. There is nothing after the file sorted alphabetically that would suggest this space. I just don't get it.
Thanks


1
2
3
4
5
6
7
cout << "The file sorted alphabetically: " << endl;
	
	for(int i = 0 ; i < size; i++ )
	{
		if(i % 10 != 0)
		cout << inputarray[i] << ' ';
		



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void printTen(string inputarray[],const int size, int wordtotal)
{
	
	cout << "The file sorted alphabetically: " << endl;
	
	for(int i = 0 ; i < size; i++ )
	{
		if(i % 10 != 0)
		cout << inputarray[i] << ' ';
		
		else if( i % 10 == 0 )
		cout<< endl << inputarray[i] << ' ';
	}
		
}


Last edited on
Actually I think it's this
1
2
else if( i % 10 == 0 )
		cout<< endl << inputarray[i] << ' ';

Because 'A' is 0 so it will output 26 times. I think .
Topic archived. No new replies allowed.