stupid error

i keep getting errors: too many characters in character constant, 4 times, code is E0026(x3) and C2015(x1)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <iostream>
#include <string>
#include <Windows.h>
using namespace std;

int main() {
	int f;
	string odgovor;
	char rasa;		
	system("mode 1000");
	system("color 4");
	cout << "\n\t\t\t\t\t\t\t\t\t\t+----------------------------+\n";
	cout << "\t\t\t\t\t\t\t\t\t\t|----------------------------|\n";
	cout << "\t\t\t\t\t\t\t\t\t\t|---------PRVA VERZIJA-------|\n";
	cout << "\t\t\t\t\t\t\t\t\t\t|---------8-bit HOROR--------|\n";
	cout << "\t\t\t\t\t\t\t\t\t\t|-------PREZIVLJAVANJA-------|\n";
	cout << "\t\t\t\t\t\t\t\t\t\t|----------------------------|\n";
	cout << "\t\t\t\t\t\t\t\t\t\t+----------------------------+\n";
	cout << "\n\n\t\t\t\t\t\t\t\t\t(Igrajte u punoj rezoluciji za bolji dozivljaj)\n" << endl << endl;
	system("pause");
	system("cls");
	//Pocetni ekran
	cout << "\n\t         PRAVILA:";
	cout << "\n\t---------------------------" << endl;
	cout << "\tOdgovore pisite JEDINO malim slovima!" << endl;
	cout << "\tVelika slova nece biti priznavana kao odgovor!" << endl;
	cout << "\n\tDozvoljeni odgovori su:" << endl;
	cout << "\t-da" << endl;
	cout << "\t-ne" << endl;
	system("pause");
	system("cls");
	cout << "\tIgra pocinje,odaberi izgled svog igraca!" << endl;
	cout << "\t----------------------------------------" << endl;
	cout << "\tKako ces se zvati?";
	cout << "\tPrvo izaberi svoju rasu" << endl;
	cout << "\t(belac,crnac ili azijat)"<< endl;
	while (true) {
		cin >> rasa;
		if (rasa == 'belac' || rasa == 'crnac' || rasa == 'azijat')
			break;
	}
	return 0;
}
Ispravio sam rasa mesto char na string i u liniji 39
rasa=='belac' itd mesto ovih navodnika '' trebaju ti dvostruki navodnici "" .Ako zelis sa jednostrukim navodnicima korisnik treba da unese samo jedan karakter ,pa bi tad rasa mogla da ostane tipa char ali bi poredio tipa if(rasa=='b' || rasa=='c' ||rasa=='a')
Hvala ti brt!
Topic archived. No new replies allowed.