How to use goto statement for 2 c++ files

Hi, I have 2 c++ files,what I want to do is as follows

File01.cpp
1
2
3
4
If(x>5)
GOTO LABEL;
else
exit


File02.cpp
1
2
LABEL;
remaining code


Please suggest how can I do this, I tried making a header file and defining a function in it, but I don`t know how should I define the function in headerfile which does this?
I am new to c++ and your help will be very much appreciated
You can't. And you shouldn't use goto in any case. It's really dangerous, and if you're a beginner, it's a terrible habit to get into.

Even the most rudimentary of textbooks or tutorials should explain how to declare and define a function.
Topic archived. No new replies allowed.