Jump to content

Need some help debugging these lines

post-155082-0-39463200-1453696940.png

 

I have previously declared all these variable above simple like:
 

double sum1;

 

I'm confused as to why this code won't work, I have a huge project file right now & this part is kinda crucial. I figured I would be able to use Sum1 in the Sum2 equation since the Sum2 equation is after it. The Sum1 variable should then be set at a number allowing it to be used in Sum2's equation? Any help appreciated.

Current PC build: [CPU: Intel i7 8700k] [GPU: GTX 1070 Asus ROG Strix] [Ram: Corsair LPX 32GB 3000MHz] [Mobo: Asus Prime Z370-A] [SSD: Samsung 970 EVO 500GB primary + Samsung 860 Evo 1TB secondary] [PSU: EVGA SuperNova G2 750w 80plus] [Monitors: Dual Dell Ultrasharp U2718Qs, 4k IPS] [Case: Fractal Design R5]

Link to comment
https://linustechtips.com/topic/534157-need-some-help-debugging-these-lines/
Share on other sites

Link to post
Share on other sites

What doesn't work about it?

 

 

From what I can tell, it's all valid to me. Is it complaining about line 68 where that red box is?

Yeah it's line 68. That line won't run. I'm trying to use the modulus to determine a remainder. Notice directly above I had division, then I was going to calculate the remainder but it won't run. I don't have much experience with modulus so I'm not sure why it's not working. I think CashValue was a double if it matters.

Current PC build: [CPU: Intel i7 8700k] [GPU: GTX 1070 Asus ROG Strix] [Ram: Corsair LPX 32GB 3000MHz] [Mobo: Asus Prime Z370-A] [SSD: Samsung 970 EVO 500GB primary + Samsung 860 Evo 1TB secondary] [PSU: EVGA SuperNova G2 750w 80plus] [Monitors: Dual Dell Ultrasharp U2718Qs, 4k IPS] [Case: Fractal Design R5]

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×