hi, the below code is C++ and has errors can someone help fixthis to produce a working ouptut showed in testing. Thanks
#include <unistd.h>
#include <cstdlib>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
void replace(std::string&str,const std::string&oldstr,conststd::string&newStr);
void replace (std::string);
void wordsearch(string p, string w);
void prefixsearch(string p, string w);
void embeddsearch(string p, string w);
void anysearch(string p, string w);
string lowercase(string s);
int size_tpos, pos, oldStr;
bool case_insensitive = true;
bool reverse_match = false;
int main(int argc, char* argv[]) {
enum MODE {
WHOLE, PREFIX, SUFFIX, ANYWHERE, EMBEDDED
}
mode = WHOLE;
int c;
while ((c = getopt(argc, argv, “:wpsaev”)) != -1) {
switch (c) {
case ‘w’: // pattern matches whole word
mode = WHOLE;
break;
case ‘p’: // pattern matches prefix
mode = PREFIX;
break;
case ‘a’:
PayPal Gateway not configured
PayPal Gateway not configured