Click here to Skip to main content
15,909,747 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: - What means "GNU"? Pin
Nish Nishant8-Nov-01 16:40
sitebuilderNish Nishant8-Nov-01 16:40 
AnswerRe: - What means "GNU"? Pin
Jim A. Johnson9-Nov-01 18:55
Jim A. Johnson9-Nov-01 18:55 
GeneralRe: - What means "GNU"? Pin
Maer72710-Nov-01 18:31
Maer72710-Nov-01 18:31 
Generalabout static function Pin
Maer7276-Nov-01 19:03
Maer7276-Nov-01 19:03 
GeneralRe: about static function Pin
Michael Dunn6-Nov-01 19:56
sitebuilderMichael Dunn6-Nov-01 19:56 
GeneralRe: about static function Pin
Maer7277-Nov-01 17:43
Maer7277-Nov-01 17:43 
GeneralRe: about static function Pin
Christian Graus7-Nov-01 0:47
protectorChristian Graus7-Nov-01 0:47 
GeneralRe: about static function Pin
Alvaro Mendez7-Nov-01 11:09
Alvaro Mendez7-Nov-01 11:09 
To answer your doubt about globally static functions. Basically this goes back to good old C, where there are only two types of functions, global and static. The syntactic difference is that static functions have the word "static" in their definition and global ones do not. Static functions are visible only inside the file in which they're compiled. Global functions are visible among all the files in the project. So if you have files A.c and B.c, they can each have a static function with the same name and the linker will treat them as two different functions. But if you remove the static modifier from them, the linker will see the same (global) function defined multiple times and give you an error.

So, basically, in C you'd want to make a function "static" when it's only going to be used inside the file it's defined and you want to avoid possible name collisions.

Regards,
Alvaro
GeneralRe: about static function Pin
Christian Graus7-Nov-01 11:14
protectorChristian Graus7-Nov-01 11:14 
GeneralRe: about static function Pin
Maer7277-Nov-01 18:06
Maer7277-Nov-01 18:06 
GeneralRe: about static function Pin
Alvaro Mendez7-Nov-01 20:04
Alvaro Mendez7-Nov-01 20:04 
GeneralRe: about static function Pin
Maer7277-Nov-01 20:36
Maer7277-Nov-01 20:36 
GeneralRe: about static function Pin
Maer7277-Nov-01 17:55
Maer7277-Nov-01 17:55 
GeneralRe: about static function Pin
Christian Graus7-Nov-01 18:01
protectorChristian Graus7-Nov-01 18:01 
GeneralRe: about static function Pin
Maer7277-Nov-01 18:27
Maer7277-Nov-01 18:27 
GeneralRe: about static function Pin
Christian Graus7-Nov-01 18:37
protectorChristian Graus7-Nov-01 18:37 
GeneralRe: about static function Pin
Maer7277-Nov-01 19:36
Maer7277-Nov-01 19:36 
GeneralRe: about static function Pin
Maer7277-Nov-01 19:33
Maer7277-Nov-01 19:33 
GeneralRe: about static function Pin
Christian Graus8-Nov-01 0:02
protectorChristian Graus8-Nov-01 0:02 
GeneralA simple question about Enum Pin
Maer7276-Nov-01 19:01
Maer7276-Nov-01 19:01 
GeneralRe: A simple question about Enum Pin
Michael Dunn6-Nov-01 20:01
sitebuilderMichael Dunn6-Nov-01 20:01 
GeneralRe: A simple question about Enum Pin
Alvaro Mendez7-Nov-01 11:19
Alvaro Mendez7-Nov-01 11:19 
GeneralRe: A simple question about Enum Pin
Maer7277-Nov-01 18:38
Maer7277-Nov-01 18:38 
GeneralA simple question about variable Pin
Maer7276-Nov-01 18:58
Maer7276-Nov-01 18:58 
GeneralRe: A simple question about variable Pin
Bernhard6-Nov-01 20:22
Bernhard6-Nov-01 20:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.