I have made the following code to find a string in some lines of text
But it always mentions the error:
no matching function for call to 'strcmp(std::string&, std::string&)'
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
using namespace std;
int main(){
cout << "Please enter some text" <<endl;
string text;
string ch;
getline(cin, text, '~');
istringstream iss(text);
string x;
iss >> x;
ch = text;
system("PAUSE");
cout << "-----------------"<<endl;
string need;
cin >> need;
if (strcmp(x, need ) == 0){
cout << "Exact.." << endl;
system("PAUSE");}
else{
cout << "ErR."<<endl;
system("PAUSE");
}
}