Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using static functions

Status
Not open for further replies.

RichardF

Programmer
Oct 9, 2000
239
GB
hi,

does anyone know what the advantage of using static functions is ?

static void DoeSomething(void)
{
...
}

~ or ~

void DoeSomething(void)
{
...
}
 
Static functions are accessible only to other functions in the file where it is created. Therefore, functions in other files would not be able to access it. This might be useful in a library where you only want to give access to the other local functions in the library, but not to outside functions using the library.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top