Posts by Lucas Penido • 15 points
3 posts
-
1
votes1
answer303
viewsQ: Sum of two floats with 2 decimal places resulting in 4 decimal places in JAVA
I am having a JAVA problem where I want to store calculation results with only 2 decimal places in SQL Server. For that at the end of my calculations I perform: Math.round(valor * 100.0f) / 100.0f;…
-
0
votes0
answers360
viewsQ: Call a method of a class from a function within the class itself? C++
I created the "checkCase4" function in my Tree class and within it I make 2 class methods (rotate_left and rotate_right). Function: void checkCase4(Node *child, Node *grand) { if (child ==…
-
0
votes1
answer663
viewsQ: Passing pointer pointer by reference
I’m making a program where I need to dynamically allocate two matrices, so I thought I’d make this allocation into a function. I tried to do it this way, but it’s giving "Segmentation Failure".…