Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //vector2d.cpp
- Vector2D::Vector2D(double d1, double d2) {
- m_x = d1;
- m_y = d2;
- }
- //vector2d.hpp
- Vector2D(double d1, double d2);
- //main.cpp
- //this works
- Vector2D(2.2, 3.4);
- //this doesnt
- Vector2D v = Vector2D(2.2, 3.4);
- // the error
- ./Vector2D.hpp:27:3: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
- Vector2D();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement