tree.hファイル:私はCに誤りを与えている共依存ヘッダを持っています。どうすれば削除できますか?
#ifndef tree
#define tree
#include "common.h"
#include "set.h"
/*Tree Structure*/
typedef struct
{
Set *set;
unsigned int setLength;
int vertexLength;
int *vertex;
int idle;
int parent;
int level;
int numberOfChildren;
} TreeNode;
typedef struct
{
TreeNode* node;
int nodeLength;
int height;
} Tree;
Tree* fill_tree(char *filename, int worldSize, int rank);
int get_number_of_leaves(Tree *tree);
TreeNode get_tree_node(int index, Tree* tree);
TreeNode* get_tree_nodes(Tree* tree);
int get_tree_nodes_length(Tree* tree);
void compute_level(int u, Tree* tree);
void print_tree(Tree* tree);
int get_max_level(Tree* tree);
int* create_task_list(Tree* tree, int* taskListLength, int rank);
int* map(int* taskList, int taskListLength, int* mapLength, int rank);
void generate_combination_sets(Tree* tree, int nodePerProcess, int rank);
#endif
set.hファイル:
#ifndef set
#define set
#include "common.h"
#include "tree.h"
/*Tree Structure*/
typedef struct
{
int combinationLength;
int* combination;
} Set;
Set* generate_subsets(int* vertex, int vertexLength, unsigned int pow_set_size, int rank);
Set* match(Set* parent, unsigned int parentLength, Set* child, unsigned int childLength, TreeNode childNode, TreeNode parentNode, unsigned int* solutionLength, Graph* g, int rank);
int* union_operation(int* parenteCombination, int parentCombinationLength, int* childCombination, int childCombinationLength, unsigned int* mergedLength, int rank);
int not_in_solution(Set* solution, int solutionLength , int* merged, unsigned int mergedLength);
void print_set(Set set);
#endif
COMMON.Hファイル:
#ifndef common
#define common
// Libraries
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <pthread.h>
#include <limits.h>
#include "mpi.h"
#include "graph.h"
#define true 1
#define false 0
#endif
私がエラーを持っているツリーとセットヘッダーファイルは共依存であり、コンパイラはsetがtree.hに見つからないというエラーと、setと同様にエラーが発生します。 common.hファイルにすべてのファイルを含めるべきですか?あなたは別のヘッダファイルに構造体を参照する必要があるとき
実際に使用している2つのタグ付きプログラミング言語はどれですか? –