Need some help with "self modifying code" in C++
Hello... Maybe what Im asking isnt very hard, but I really dont know because I never did it before... Anyway heres what I want:
Im learning Assembly right now and with Assembly its very easy to write machine code in some memory location while the application is actually running and then call it using a jmp instruction. So, as Im much more familiar with C++ and like it better, Im trying to think of some way to do something like that(if it is possible) using C or C++... Basically writing machine code to memory and then call it... Is there any way of doing this in C++, or will I have to use Assembly to do this?
And of course I'll not try to write a whole program in machine code straight to memory and then call it.. I Just wanna know if it is possible or not...