title: How to declare struct defined in different namespace?
body: <p>I'm having trouble using a struct that I declared in a different namespace. In File1.h I declare the struct and put it in namespace "Foo".</p>
  
  <pre><code>//File1.h
  namespace Foo{
      struct DeviceAddress;
  }
  
  struct DeviceAddress {
      uint8_t systemID;
      uint8_t deviceID;
      uint8_t componentID;
  };
  </code></pre>
  
  <p>In File2.c I try to create an instance of that struct:</p>
  
  <pre><code>//File2.c
  #include "File1.h"
  struct Foo::DeviceAddress bar;
  </code></pre>
  
  <p>But I get an error for the line in File2.c where I try to declare the struct. The error message is:
  error C2079: 'bar' uses undefined struct 'Foo::DeviceAddress'</p>
  
  <p>I'm using the MS C++ compiler with Visual Studio as a development environment.</p>
  
  <p>Am I making some sort of syntax error trying to declare 'bar' or am I not understanding something about namespaces or structs?</p>