But perhaps you mean a goto that skips over function boarders? Not sure if you can do that in C and C++, if you can do that ofc. the stack is in your hands
It's called setjmp and longjmp and has been a part of the C standard since C89. However, you can still only jump UP through the stack, i.e. to a calling function, to code that has already been run.
See https://en.wikipedia.org/wiki/Setjmp.h for more information.