Click here to Skip to main content
15,913,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
- You're welcome.

- In C++ "static" can also be used for class/struct member functions. This allows you to call it without having an instance of the class/struct. So if you have this:

class A
{
public: static void foo();
};


You can then call it directly, like this:

A::foo();


without needing to first create an instance of A.

- Static C functions work the same way in C++. They're only local to the file in which they're compiled. So if you have a static C function, only that C file can see it.

- Hope to have helped, but you really need to pick up a couple of C/C++ books and read them thoroughly.

- Regards,
Alvaro
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 
GeneralRe: A simple question about variable Pin
Maer7277-Nov-01 18:58
Maer7277-Nov-01 18:58 
GeneralRe: A simple question about variable Pin
Nish Nishant6-Nov-01 21:31
sitebuilderNish Nishant6-Nov-01 21:31 
GeneralRe: A simple question about variable Pin
Maer7277-Nov-01 18:47
Maer7277-Nov-01 18:47 

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.