I have one class:

field.h
Qt Code:
  1. #ifndef FIELD_H
  2. #define FIELD_H
  3.  
  4. class Field : public QWidget
  5. etc
  6.  
  7. #endif
To copy to clipboard, switch view to plain text mode 

And then I have another class that uses this class as composition:

Page.h
Qt Code:
  1. #ifndef PAGE_H
  2. #define PAGE_H
  3.  
  4. #include "field.h"
  5.  
  6. class Page : public QWidget
  7. {
  8. Field array[10];
  9. }
  10.  
  11. #endif
To copy to clipboard, switch view to plain text mode 

At compile I get the error of 'Field' does not name a type, I don't know how to fix this? Internet seems to spring up a lot of circular includes as being the culprit however I don't understand how this is the case given that this is composition and I've got all my includes all up and running and it seems to work here:

http://www.learncpp.com/cpp-tutorial/102-composition/

!!!!!!!!!!!!!!!!!!!!!!!!! << sorry coding a line a week is frustrating. Every time something is added, a new error comes about and it's just beyond frustrating. Programing isn't my forte I don't think.