c – 字段具有不完整的类型

我有错误的“领域不完整的类型”,但也不确定为什么.有人可以帮忙吗?谢谢!
g++ -pipe -W -Wall -fopenmp -ggdb3 -DDEBUG -fno-omit-frame-pointer  -c -o test.o ../../src/test.cc  
In file included from ../../src/test.cc:50:  
../../src/feature_haar.h:14: error: field ‘_count’ has incomplete type

test.cc

#include "feature_count.h"  
#include "feature_random_counts.h"  
#include "feature_corner.h"  
#include "feature_haar.h" // line 50

feature_haar.h

#ifndef FEATURE_HAAR_H  
#define FEATURE_HAAR_H  

#include "misc.h"  
#include "feature.h"  
#include "vignette.h"  
#include "feature_count.h"  
#include <cassert>  

class FeatureHaar: public Feature    
{  
 public:  

  FeatureCount _count;// line 14  
...  
}  
#endif

feature_count.h

#ifndef FEATURE_COUNT_H  
#define FEATURE_COUNT_H  

#include "misc.h"  
#include "feature.h"  
#include "random_rect.h"  
//#include "feature_integral_img.h"  


class FeatureCount: public Feature {  

  public:  

   Randomrect _rect;  


   char _type[buffer_size];  


   // This method returns an upper-caps string to identify the feature  
   const char *name() ;  

   FeatureCount();  


   FeatureCount( int width,int height,const char *type = "black-count",float WHRatio=-1,int roi_x=0,int roi_y=0,int roi_w=0,int roi_h=0 );  


   ~FeatureCount();  




   // compute features from original data i.e. image  
   void compute(double *integral_image,double *feature);  


   // IO  
   void write_humanreadable(ostream *out);  
   void write(ostream *out);  
   void read(istream *in):  
 };  


#endif

feature.h中

#ifndef FEATURE_H  
 #define FEATURE_H  

 #include "misc.h"  
 #include "vignette.h"  


 class Feature {// generate the feature from the original data of an example,not responsible for holding the feature.  
 public:  
   int _dim;  


   // We need a virtual destructor since there are virtual methods  
   virtual ~Feature();  

   // This method returns an upper-caps string to identify the feature  
   virtual const char *name() = 0;  


   // write the data into files  
  static void write_matrix_data(double ** features,int *labels,int nb_examples,int dim,const char * filename);  
  static void write_index_data(double ** features,const char * filename);  
  static void write_compact_data(double ** features,const char * filename);  



   // compute features from original data i.e. image  
   virtual void compute(Vignette *vignette,double * feature); // this function/class not responsible for allocating/deallocation memory for array feature  
   virtual void compute(double *integral_image,double *feature);  



 // feature preprocessing  

   // scaling each feature s.t. its sample max = 1 and min = 0   
   static void scale_features(double *Data,double *scales_min,double *scales_max);  
   static void compute_linear_scale(double **Data,int size,double *scales_max);  

   // standardize each feature s.t. its sample mean = 0 and sample standard deviation = 1  
   static void standardize_features(double *Data,double *mean,double *std);  
   static void compute_standardization(double **Data,double *std);  


 };  

 #endif

解决方法

感谢所有帮助我的人.这是我的坏FeatureCount的定义是不对的.其成员
void read(istream *in):

应以“;”结尾不“:”.

这么小的拼写错误怎么这么难找?

相关文章

本程序的编译和运行环境如下(如果有运行方面的问题欢迎在评...
水了一学期的院选修,万万没想到期末考试还有比较硬核的编程...
补充一下,先前文章末尾给出的下载链接的完整代码含有部分C&...
思路如标题所说采用模N取余法,难点是这个除法过程如何实现。...
本篇博客有更新!!!更新后效果图如下: 文章末尾的完整代码...
刚开始学习模块化程序设计时,估计大家都被形参和实参搞迷糊...