In the file: "priority_queue.h", I have defined the struct:
#include "astar.h"
typedef struct p_q{
struct astar_node* first;
struct astar_node* last;
int size;
}P_Q;
The file "astar.h" looks like this:
#include "priority_queue.h"
typedef struct astar_node{
struct astar_node* next;
struct astar_node* prev;
struct astar_node* PQ_next;
struct astar_node* PQ_prev;
int x;
int y;
int c;
int h;
int tot_cost;
}Astar_node;
int func(P_Q* P);
Why do I get the error: "Unknown typename 'P_Q' ?
If i redefine "funk()" to :
int func(struct p_q* P);
the error disappears but i get the warning:"Description Resource Path Location Type 'struct p_q' declared inside parameter list will not be visible outside of this definition or declaration"
Anyone knows why?
struct astar_nodedefined?priority_queue.hincludesastar.handastar.hincludespriority_queue.h, right? Sounds problematic.priority_queue.h, i.e. instead of includingastart.h, trystruct astar_node;before definingP_Q