And what exactly is the problem? Although from just glancing I think you should remove #include<stdio.h> as you already are using the iostream library also remove your #define ... and use const int instead its better practise for C++.
Also avoid using global variables and make them part of your main.
What I understand is that you are trying to REMOVE a substring from a string. This is the c++ way.
using namespace std;
int main ()
cout<<"Enter first string: ";
cout<<"Enter second string (to remove): ";
int indexhere = mazin.find(inputstring); //the starting index (zero-based)
int numberofchars =inputstring.length(); //the number of characters to take away
cout<<"Substring removed: "<<mazin.erase(indexhere,numberofchars)<<'\n';
cout<<"Could'nt find input string in original string.\n";
Now, understand this code and then modify it to your needs.
Using C-style strings requires complicated manipulation. This is why I suggest this.