I'm struggling with some basic errors I simply don't understand.
utils.cuh
#pragma once
#include "stdafx.cuh"
#include "NCMForest.cuh"
#include "NCMTree.cuh"
int readCSV(int Nrow, int Ncol, char *sep, char *filename, double **data, char **fields_names);
int closest_centroid(c_Node **pnodes, double *element, int nb_centroids, int nb_features);
NCMForest.cuh
#pragma once
#include "utils.cuh"
#include "stdafx.cuh"
#include "NCMTree.cuh"
class c_Forest
{
int nb_trees;
int max_depth;
int max_features;
int min_samples_split;
c_Tree **trees;
};
NCMTree.cuh
#pragma once
#include "utils.cuh"
#include "stdafx.cuh"
#include "NCMForest.cuh"
class c_Node;
class c_Tree;
class c_Node
{
public:
float *centroid; //Centroid coords
bool is_leaf; //Is it a leaf
int nb_children; //How many children
c_Node **children; //Node children
c_Node();
int update_centroid(); //Update the centroids
double **current_data;
};
class c_Tree
{
public:
int ID; //Tree ID
c_Node *root; //Root node
c_Tree(int p_features_per_node, int p_max_depth, int p_min_samples_split, int p_min_sample_leaf, int p_nb_features);
~c_Tree();
int train(int nb_labels, c_Node *currentNode);
int classify(double *element, c_Node *Node);
};
The first one is identifier "c_Tree" is undefined" at the line 14 of NCMForest.cuh. And the second one is identifier "c_Node" is undefined" at the line 8 of utils.cuh
I don't understand why I'm having this errors. The headers that defines this classes are included in the files. Any clue ? :/