library declaration

i have two problems
* in recursion and classes i found out that we can use things without declaring and defining them them:
-recursion we use the function without COMLETELY defining it so how is this possible ! and in classes we can find a member wich is of the type class without the class has been fully defined or even declared !
-about library i want to know more about them if is this possible how do i find documents about how libraries ( where do they exist how do i download more etc ) thanx
i have two problems

Okay.

in recursion and classes i found out that we can use things without declaring and defining them them:
-recursion we use the function without COMLETELY defining it so how is this possible !

1. "COMELETELY" isn't a word.
2. No you can't use the function without defining it, I have no idea what you are talking about.

Here is an example of recursion if you are confused.

1
2
3
4
5
6
7
8
9
void recurse()
{
  recurse(); //Function calls itself
}

int main()
{
  recurse(); //Sets off the recursion
}


and in classes we can find a member wich is of the type class without the class has been fully defined or even declared !

1. "wich" is not a word
2. Really hard to decipher this sentence. I'm guessing that you are trying to say that we can declare a member of a class without actually initializing it. Yes that is true with any variable regardless of it being inside a class.
3.
or even declared !
No, this isn't true. You have to declare any variable in C++.


For example:
int age; //This is valid. int age //This is not valid.

Also:

1
2
3
4
5
6
7
8
9
10
11
12
class wich{
  public:
             int COMELETELY;
  private:
             //Private stuff
};

int main() {
    wich instance; //instantiation of object
    wich.COMELETELY = 55; //this is valid
    return 0;
};


-about library i want to know more about them if is this possible how do i find documents about how libraries ( where do they exist how do i download more etc ) thanx

1. This is 3 problems, not 2.
2. Libraries do exist all over the world. Oh wait you're talking about C++ Libraries? Just Google C++ Libraries.
Topic archived. No new replies allowed.