Skip to content

Conversation

@aneskiss
Copy link

No description provided.

Lab3CPP/lab3.cpp Outdated

typedef vector<vector<int>> Graph;

vector<int> bfs(const Graph& graph, int start) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для возвращаемого значения нужен typedef.

Lab3CPP/lab3.cpp Outdated
vector<int> bfs(const Graph& graph, int start) {
int n = graph.size();
vector<int> distances(n, -1);
vector<bool> visited(n, false);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Без этого массива можно обойтись.

ListItem* next;
ListItem* prev;
Data data;
};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эти структуры должны быть в cpp.

struct Queue;
struct Queue {
List* list;
};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Структура должна быть определена в cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants