cin with an array

I have put a bunch of words from a text file into array1, then separated the letters and sorted them into alphabetical order. What i want to do now is put them in the array again but i get the error " binary '>>' : no operator found which takes a right-hand operand of type 'const char [2]' (or there is no acceptable conversion)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  
	FILE* file = fopen("C:\\Users\\Chris\\Documents\\words.txt", "r"); // opens the file and puts it in array
	
	while (fgets(line, sizeof(line), file))
	{
		strcpy(array1[i], line);
		std::sort(array1[i], array1[i]+sizeof(array1[i]));
		i++;
	
	}

	for( int j = 0; j <sizeof(array1); j++)
	{
		for (int k = 0; k < sizeof(array1[k]); k++)
			{
				
				cin >> array1[j][k] >> " ";
				
			}
	}
Line 17 has cin >> " ";
The string " " is a constant, you can't read input from the keyboard and store it there.

Probably all you need is simply:
cin >> array1[j][k];
Topic archived. No new replies allowed.