How to execute code from a certain point.

I know this is an easy question, I googled it, I don't know what the term is I'm trying to google though. I'm trying to start the debugging from a certain point, what is this?
are you asking about breakpoints?
Yes, how do you use breakpoints to start from a certain point in the code
If you are using an IDE, google how to set a breakpoint. What this will do, is let the code run until that point in the code, and then will stop, (aka break) the code (hence the term 'break' + 'point'). This will allow you to run the code step by step from there. (You must be running debug mode for this to work)

If you really want to start the code from a certain location, and not execute everything before it quickly, then either have the starting point in a function, that if your program needs to debug (set this with a boolean), you can call that function. If all of your code is done in the main() function (which is discouraged except for extremely small projects), look into the 'goto ' statement in C++.
Last edited on
Topic archived. No new replies allowed.