Hi!

So, I have this class inside a namespace but when i try to create an instance i get the following error message:
Qt Code:
  1. #ifndef FILE_H
  2. #define FILE_H
  3.  
  4. #include "constants.h"
  5.  
  6. #include <cstdlib>
  7.  
  8. #include <QVector>
  9.  
  10. namespace Compressor {
  11. class File;
  12. }
  13.  
  14. class File {
  15. public:
  16. QVector<QVector<int>> bytes;
  17. int length;
  18. public:
  19. File(int l);
  20. };
  21.  
  22. #endif // FILE_H
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. #include "file.h"
  2.  
  3. File::File(int l) {
  4. length = l;
  5.  
  6. for(int i = 0; i < length; i++) {
  7. QVector<int> b;
  8.  
  9. for(int j = 0; j < BYTESIZE; j++)
  10. b.push_back(rand( ) % 2);
  11.  
  12. bytes.push_back( b );
  13. }
  14. }
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3.  
  4. #include "file.h"
  5. #include "tableconfig.h"
  6. #include "tableshow.h"
  7.  
  8. #include <QMainWindow>
  9.  
  10. namespace Ui {
  11. class MainWindow;
  12. }
  13.  
  14. class MainWindow : public QMainWindow {
  15. Q_OBJECT
  16. public:
  17. Compressor::File *fl;
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. void MainWindow::on_buttonOrigin_clicked( ) {
  2. fl = new Compressor::File( ui->spinBox->value( ) ); // The problem happens here.
  3. showBytesTable(ui->tableOrigin, fl);
  4. }
To copy to clipboard, switch view to plain text mode 
/home/rob/Programming/C-C++/Linux/Qt/Compressor-4bits/mainwindow.cpp:13: error: invalid use of incomplete type ‘class Compressor::File’
fl = new Compressor::File( ui->spinBox->value( ) );
^
How can I fix that?