大佬教程收集整理的这篇文章主要介绍了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@H_607_5@
#include "feature_count.h" #include "feature_random_counts.h" #include "feature_corner.h" #include "feature_haar.h" // line 50
feature_haar.h@H_607_5@
#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@H_607_5@
#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中@H_607_5@
#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
以上是大佬教程为你收集整理的c – 字段具有不完整的类型全部内容,希望文章能够帮你解决c – 字段具有不完整的类型所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。