Borderou de evaluare (job #995486)
Utilizator | Data | 9 septembrie 2013 00:31:09 | |
---|---|---|---|
Problema | BFS - Parcurgere in latime | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In constructor ‘Graph::Graph()’:
user.cpp:16:32: error: ‘number_of_vertices’ was not declared in this scope
Graph() : number_of_vertices_(number_of_vertices), number_of_edges_(number_of_edges) {
^
user.cpp:16:70: error: ‘number_of_edges’ was not declared in this scope
Graph() : number_of_vertices_(number_of_vertices), number_of_edges_(number_of_edges) {
^
user.cpp:12:21: warning: ‘Graph::number_of_vertices_’ will be initialized after [-Wreorder]
const unsigned int number_of_vertices_;
^
user.cpp:11:21: warning: ‘const unsigned int Graph::number_of_edges_’ [-Wreorder]
const unsigned int number_of_edges_;
^
user.cpp:16:2: warning: when initialized here [-Wreorder]
Graph() : number_of_vertices_(number_of_vertices), number_of_edges_(number_of_edges) {
^
user.cpp:16:2: error: uninitialized member ‘Graph::kMaxVertices’ with ‘const’ type ‘const unsigned int’ [-fpermissive]
user.cpp: In member function ‘void Graph::calculateDistance(unsigned int, unsigned int*)’:
user.cpp:26:45: error: declaration of ‘unsigned int distances [(int)((Graph*)this)->Graph::number_of_vertices_]’ shadows a parameter
unsigned int distances[number_of_vertices_];
^
user.cpp:28:41: error: ‘memset’ was not declared in this scope
memset(distances, 0, sizeof(distances));
^
user.cpp:32:8: error: ‘class std::queue<unsigned int>’ has no member named ‘push_back’
path.push_back(source);
^
user.cpp:36:60: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int neighbour = 0; neighbour < edges_[vertex].size(); neighbour++) {
^
user.cpp:38:11: error: ‘class std::queue<unsigned int>’ has no member named ‘push_back’
path.push_back(edges_[vertex][neighbour]);
^
user.cpp:44:9: error: ‘class std::queue<unsigned int>’ has no member named ‘pop_front’
path.pop_front();
^
user.cpp: In function ‘int main()’:
user.cpp:60:17: error: no matching function for call to ‘Graph::Graph(int&, int&)’
Graph graph(n,m);
^
user.cpp:60:17: note: candidates are:
user.cpp:16:2: note: Graph::Graph()
Graph() : number_of_vertices_(number_of_vertices), number_of_edges_(number_of_edges) {
^
user.cpp:16:2: note: candidate expects 0 arguments, 2 provided
user.cpp:8:7: note: constexpr Graph::Graph(const Graph&)
class Graph{
^
user.cpp:8:7: note: candidate expects 1 argument, 2 provided
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !