what does it means if function or struct that declares outsidetheclass

Hello all
i notice that there something like declaring function outside of class
what does it means ?
for example :

this is the header
void * getSomething();

struct B {
char* f;
};

class A {
...
...
};


and then the implementation if like this :

viod* getSomething(){
...
...
}

what is the meaning of such thing ?
why is it outside the class ?

Comments

  • : Hello all
    : i notice that there something like declaring function outside of
    : class
    : what does it means ?
    : for example :
    :
    : this is the header
    : void * getSomething();
    :
    : struct B {
    : char* f;
    : };
    :
    : class A {
    : ...
    : ...
    : };
    :
    :
    : and then the implementation if like this :
    :
    : viod* getSomething(){
    : ...
    : ...
    : }
    :
    : what is the meaning of such thing ?
    : why is it outside the class ?
    :

    Well, without more information the only thing I can say is that it's a global function.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion