Static and non static functions

  • Thread starter Thread starter Alejandro
  • Start date Start date
A

Alejandro

Is it possible for a class to have a function available both as static
and as instance function?
 
Alejandro said:
Is it possible for a class to have a function available both as static
and as instance function?

Yes, but the parameter lists have to be different (just like any set of
overloaded functions).

-cd
 
Hello Alejandro,

Why do you want to have two different methods? Is there a difference in behavior
between them?

Saad
 
Hello, Alejandro!

A> Is it possible for a class to have a function available both as static
A> and as instance function?

Compiler will not let you define twice or more methods with same name and same signature.
There will be compiler error...

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Back
Top