The code is:
I'm trying to make something like lua has:
This was me trying to use the function:
The error I got was "Segment Fault".
This is my 2nd day trying C++ so I'm mostly looking for what I've done wrong not how what I made was inefficient but I appreciate any feedback!