Call labels inside function

Status
Not open for further replies.

gauravkothari23

Advanced Member level 2
Joined
Mar 21, 2015
Messages
640
Helped
5
Reputation
10
Reaction score
4
Trophy points
1,298
Activity points
6,922
Hi all..
I need to know how can i call a lable created inside main function uaing some other function
For example.
Code:
Void Main()
{
While(1)
{
Code here.
Label:
{
 While (1)
 { 
  Code here
 }
}
}
}

Void function
{
While(1)
{
Code here.
Call label inside main().
}
}
In this above code i want to call the lable which is inside the main function from void function().
 

You can't, even if you use setjmp.h in your case (it is used to transfer control not to call code portions).

As you said, you want to CALL. So there must be a function there for ypu to call.
Create a function to initialize array and call this function from within main() and your other function as well.
 
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…