Point P0(0,0), P1(3, 4), P2(-50,-3), P3(2,0); //Input Points (fine)
std::vector<Point> Points(P0,P1, P2 ,P3); (not fine)
This does not seem to work. How do I initialize points vector to the values above? Or is there an easier way to do this?
If you are using c++11, you can use braces to declare vectors inline.
std::vector<Point> Points {P0, P1, P2, P3};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With