I'm currently programming c++ in codeblocks but I cannot paste content in a string.
When I use the command "cin", the prompt screen appears, but when I paste the content or even right click on the screen, the IDE Closes:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string frase =
"TransacaoCartaoMODALIDADE-E"
"TransacaoCartaoMODALIDADE-S"
"ObtemLogUltimaTransacao-E"
"ObtemLogUltimaTransacao-S"
"ConfirmaCartao-E"
"ConfirmaCartao-S"
"ConfirmaCartaoMODALIDADE-E"
"ConfirmaCartaoMODALIDADE-S"
"FinalizaTransacao-E"
"FinalizaTransacao-S";
string word;
cout << "paste the o log here " <<endl;
cin >> word;
bool found = frase.find(word) != string::npos;
if (found) {
cout << "Found" << word<<endl;
}
else {
cout << "Not found!" << endl;
}
return 0;
}