[ maricn @ 24.05.2009. 02:13 ] @
ovako, imam sledece fajlove: Graph.cpp, Graph.h, bfs.h, queue.h... mozete pretpostaviti o cemu se radi... e sad, ovako sve to izgleda... bfs.h: Code: #ifndef __BFS_H #define __BFS_H #include "Graph.h" #include "queue.h" #include <iostream> #include <vector> using namespace std; vector<sCvor*> bfs(sCvor *s, sCvor *g) { vector<sCvor*> put; put.clear(); sCvor* i; i = new sCvor; i->id = 12345; put.push_back(i); return put; } Graph.h: Code: #ifndef __GRAPH_H #define __GRAPH_H #include <iostream> #include <vector> #define MAXNODES 1000 #include "bfs.h" using namespace std; bool occupied[MAXNODES]={false}; struct sCvor { long int id; }; queue.h: Code: #ifndef __QUEUE_H #define __QUEUE_H #include "Graph.h" struct sCvor; struct node { sCvor *c; node *next; }; kada probam da kompajliram izbacuje mi sledece greske: Code: /media/hd1_/C[cpp] Projekti/graf maturski graph search/bfs.h||In function ‘std::vector<sCvor*, std::allocator<sCvor*> > bfs(sCvor*, sCvor*)’:| /media/hd1_/C[cpp] Projekti/graf maturski graph search/bfs.h|14|error: invalid use of incomplete type ‘struct sCvor’| /media/hd1_/C[cpp] Projekti/graf maturski graph search/queue.h|7|error: forward declaration of ‘struct sCvor’| /media/hd1_/C[cpp] Projekti/graf maturski graph search/bfs.h|15|error: invalid use of incomplete type ‘struct sCvor’| /media/hd1_/C[cpp] Projekti/graf maturski graph search/queue.h|7|error: forward declaration of ‘struct sCvor’| ||=== Build finished: 4 errors, 0 warnings ===| moze pomoc? hvala unapred :) alavh unazad... ;) |