passing char from one char array to another

I keep getting the error
footballA2.cpp:290:36: error: invalid array assignment
winningteamnames[WINTEAMcounter] = shuffledteamnames[index1];
^
and i have no idea why its not letting me transfer the data into winningteam names. Both winningteamnames[8][80] and shuffledteamnames[8][80] are global char arrays.
1
2
3
4
5
6
7
8
9
10
 if (team1 > team2)
	{
		cout << shuffledteamnames[index1] << " beat the " << shuffledteamnames[index2] << " " << team1 << "-" << team2 << " in a game 1." << endl;
		winningteamnames[WINTEAMcounter] = shuffledteamnames[index1];
	}
	else if (team1 < team2)
	{
		cout << shuffledteamnames[index2] << " beat the " << shuffledteamnames[index1] << " " << team1 << "-" << team2 << " in a game 1." << endl;
		winningteamnames[WINTEAMcounter] = shuffledteamnames[index2];
	}


inside shuffled team names is a string that looks like:
1
2
3
4
5
6
7
8
Trojans
Bruins
Bears
Trees
Ducks
Beavers
Huskies
Cougars


i appreciate all the help and let me know if i could provide more information to make my problem more clear.

I am also not allowed to use vectors or strings
Last edited on
You cannot assign one array to another.

If they're c-strings, use strcpy.
http://www.cplusplus.com/reference/cstring/strcpy/
Topic archived. No new replies allowed.