The below code snippet is generating the error: expected identifier before 'nullptr'
as well as error: expected ',' or '...' before 'nullptr'
in line edge minIncoming(nullptr, NOPATH);
Any idea what is wrong? All I want to do is use the constructor to initialize minIncoming. I tried searching but couldn't find a answer. I apologize in advance if question is too basic.
#include <vector>
#include <unordered_map>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <queue>
#define MAXN 8
#define NOPATH 1000000
#define DEBUG
using namespace std;
struct vertex;
struct edge
{
vertex* node;
int weight;
edge(vertex* n, int w) : node(n), weight(w) {}
};
struct vertex
{
vector< edge > outgoing;
edge minIncoming(nullptr, NOPATH);
bool visited;
#ifdef DEBUG
int id;
#endif // DEBUG
};