Another C++ was not declared in this scope error
<p>Several questions has been asked related to this error, but each one of them practically relates to the object or type in question not declared before usage. For example:</p>

<pre><code> class A 
 {
   public:
     A_Object a_obj;   
 };
</code></pre>

<p>Getting the error <code>A_Object was not declared in this scope</code> means <code>A_object</code> is not declared anywhere within the file.</p>

<p><strong>NOTE:</strong> This is my understanding of the error.</p>

<p>Now I have a file called <code>Account.h</code> as shown below:</p>

<pre><code>#ifndef ACCOUNT_H_
#define ACCOUNT_H_
class Account
{
  //fields and methods
};
#endif /* ACCOUNT_H_ */
</code></pre>

<p>I also have a second file called <code>Address.h</code> as shown below:</p>

<pre><code>#ifndef ADDRESS_H_
#define ADDRESS_H_
#include "Account.h"

typedef Account account_type;//Error here
class Address
{
 //Fields and methods
};
#endif /* ADDRESS_H_ */
</code></pre>

<p>When I try to compile this file I get the error <code>Account was not declared in this scope</code>. </p>

<p>Any Ideas why?</p>
