how do i include .Equals()?

Hey recently i tried .Equals() on my small test calculator, but it doesnt seem to find it ;( Maby .Equals isnt even in c++? here is my 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <iostream>
#include <string>
#include <Equals>


using namespace std;


int main(){
	
	int a;
	int b;
    string modus;
	int sum;
	
	cout << "Welcome to the amazing calculator,\n";
	cout << "Please enter your first number: ";
	cin >> a;
	cout << "Now enter your second number:";
	cin >> b;
	cout << "Type 1 to extract \n";
	cout << "Type 2 to divide \n";
	cout << "Type 3 to make a sum \n";
	cout << "Type 4 to multiply them";
	cin >> modus;
	
	if(modus.Equals('1'))
	{
		sum = a - b;
	}else if(modus.Equals('2'))
			 {
				 sum = a / b;
			 }else if(modus.Equals('3'))
					  {
						  sum = a + b;
					  }else if(modus.Equals('4'))
							   {
								   sum = a * b;
							   }else {return 0;}
							   
							   cout << "Your answer is: " <<sum;
	
	
	
	return 0;
}

Thanks!
No, Equals is not a member of std::string. You can use operator== to compare a string with another string. if(modus == "1") Note that double quotes are used for strings. Single quotes is used for characters.
Thanks!
Topic archived. No new replies allowed.