0

I declared this inside one function:

void function()
{
    ....
    static const int iLimit = GetLimit();
    int iL = a_MyArray[iLimit];
    ....
}

The code compiles ok in g++. What I want to know is whether the GetLimit function will be called only once (At the first call to function() ?). Plz help. Thanks

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by dumrat
0

Nvm. It happens that way. It only gets called at the first time.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.