keep getting errors/warnings

here is the source code

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
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
inline void keep_window_open() {char ch; cin >> ch;}

//	program to convert spelled out numbers to digits

int main()
{
	cout << "Spell out a number from 0-4 to see the cooresponding digit: ";
	string num;
	cin >> num;
	cout << endl;
	
	if (num == 'zero')
		cout << "0\n";
	else if (num == 'one')
		cout << "1\n";
	else if (num == 'two')
		cout << "2\n";
	else if (num == 'three')
		cout << "3\n";
	else if (num == 'four')
		cout << "4\n";
	else
		cout << "Not a number I know. Stupid Computer!\n";
}


it keeps saying error: no match for 'operator==' in 'num == 2053468783' and
warning: character constant too long for its type. it keeps saying this for each if/if else statment. cant figure it out. hope u can help. thanks
do this:
num == "one"
yeah that worked. thanks. my bad
Topic archived. No new replies allowed.