I defined the object tuple and a Point data-structure as follows:
typedef pair<double, double> slopeIntercept;
typedef struct Point {
int x;
int y;
Point(): x(0), y(0) {}
Point(int a, int b): x(a), y(b) {}
}Point;
Now, let us employ these objects to initialize an unordered_map in C++11
void foo(){ unordered_map<slopeInter , unordered_set<Point>> slopeCount; }
The above initialization of unordered_map causes a compile time error .
Aucun commentaire:
Enregistrer un commentaire