Posts by dougllas • 91 points
5 posts
-
3
votes1
answer100
views -
3
votes2
answers714
views -
-3
votes1
answer66
viewsQ: Rotation over a point on a 2D pivot in Java
I’m trying to figure out how to rotate a vector over a point (another vector) as a PIVOT tried on some websites that gave me the following code: public Vector2 rotate_point(float cx,float cy,float…
-
-1
votes1
answer65
viewsQ: Memory leak in Return
I’m reading a book and I came across this code: class SimpleCat { public: SimpleCat (int age, int weight); ~SimpleCat() {} int GetAge() { return itsAge; } int GetWeight() { return itsWeight; }…
-
0
votes1
answer191
viewsQ: Avoid memory leakage in return function
There is an exercise in the C++ book that asks you to create a function that returns an object avoiding memory leakage. I did so but I’m not sure if it really works: class Point1{ public : int x;…