Показать сообщение отдельно

  #9  
Старый 12.12.2008, 22:21
Doom123
Постоянный
Регистрация: 11.11.2006
Сообщений: 834
Провел на форуме:
3941248

Репутация: 668


По умолчанию

Код:
	char gamer1;
	cin >> gamer1;
	char *fields[9] = {" "," "," "," "," "," "," "," "," "};
	char hod;
	cin >> hod;

	if(hod == "1x1") fields[0] = gamer1;
	else if(hod == "1x2") fields[1] = gamer1;
	else if(hod == "1x3") fields[2] = gamer1;
	else if(hod == "2x1") fields[3] = gamer1;
	else if(hod == "2x2") fields[4] = gamer1;
	else if(hod == "2x3") fields[5] = gamer1;
	else if(hod == "3x1") fields[6] = gamer1;
	else if(hod == "3x2") fields[7] = gamer1;
	else if(hod == "3x3") fields[8] = gamer1;
Код:
error C2446: '==' : no conversion from 'const char *' to 'int'
error C2040: '==' : 'int' differs in levels of indirection from 'const char [4]'
error C2440: '=' : cannot convert from 'char' to 'char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
:'( ????

Последний раз редактировалось Doom123; 12.12.2008 в 22:29..
 
Ответить с цитированием