C++ multiple file error
<p>i have been attempting to pass an object into a function that belongs to a class both classes are in there own files...but when i try to pass the object as an argument for the function prototype it gives me an error saying that the object doesn't exist... ill provide some pseudo code to demonstrate my problem</p>

<pre><code>//class 1 .h
class Class1
{
    public:
    void function(Class2);//this is were one of my errors 
};



//class 1 .cpp
void Class1::function(Class2 object )//another error 
{
//stuff happens
}


//main.cpp
//then i simply call these functions like this

Class1 object;
Class2 object2;


int main()
{


    object.function1(object2);
    return 0;
}
</code></pre>

<p>and i get errors "Class2' has not been declared"<br>
and errors about Class1 prototype does not match any classes....
if someone could explain what im doing wrong it would be a great help also if more code is needed just ask and i will post it.<br>
<strong>EDIT</strong>  </p>

<p>when i was attempting to include class2`s header in class one i was using the wrong director as i forgot i had separated .h files into there own folder anyway now i have fixed that it all work thanks a lot everybody.</p>
