Replace part of the string with n size with string of m size
There's no definition in scope for size_t.  Since the description implies that you want std::size_t, you'll need

#include &lt;cstddef&gt;
using std::size_t


But I recommend just writing std::size_t in full where you use it - that's much clearer to readers.




size_t get_str_size(const char* temp){
            size_t s=0;
            while( temp[s] != '\0' )s++;
            return s;
        }



You've just re-implemented std::strlen() for no good reason.




    char* tempcopy = new char[original_size]; // holds the copy of the temp

    char *new_version = new char[ original_size + (new_size-old_size) ];

    delete tempcopy;
    delete new_version;



Memory allocated with new[] must be released using delete[] (not delete).  Valgrind will catch this error for you.



We have a memory leak if the first allocation succeeds and the second fails, because there is no delete[] tempcopy if an std::bad_alloc is thrown.



We reference deleted memory here:


    temp = (const char*)new_version;

    delete new_version;

    std::cout &lt;&lt; &amp;temp &lt;&lt; "\t" &lt;&lt; temp &lt;&lt; std::endl;



That's Undefined Behaviour (and also caught by Valgrind - I really recommend you run your code under Memcheck, or any similar tool of your choice).




int main(int argc, char **argv){



Since we never use the arguments, there's no need to give them names; moreover, there's a signature of main() we can use with no arguments:

int main()





     for( int i =0 ; i &lt;= original_size; i++ ){



Avoid comparing signed values (such as i) against unsigned ones (such as original_size).  We probably want the range of i to match, too, so just use the same type for both.



The code isn't very robust against a range of inputs.  In particular, if edelim is less than ldelim, we'll get (unsigned) integer overflow when we compute old_size, giving incorrect results.



Overall, the code looks very much like C code - and poor C code at that (e.g. copying 1 char at a time, rather than with memcpy()).  A C++ implementation (using std::string) is much shorter and more natural.