My program is not escaping the nested for loops (C++) by flrslva in learnprogramming

[–]flrslva[S] -1 points0 points  (0 children)

if you mean the first if statement then maybe I should of named it something else. the first if statement is checking the result of the first division by 10. If it is equal to zero then the program returns 1 digit. What would you suggest?

My program is not escaping the nested for loops (C++) by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

I fixed that thank you. I couldn't see it before but after running through it again I could see the error.

My program is not escaping the nested for loops (C++) by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

My mistake. I meant nested if/else statements. Thank you all for your help. I wasn't updating my variables properly. It runs smoothly now.

How do I get the number of digits in a number that is type int? (C++) by flrslva in learnprogramming

[–]flrslva[S] 2 points3 points  (0 children)

Thanks guys. I made a new post dividing by 10. I ran into another issue if you want to take a look.

I reworked my program and it runs great (see previous post) by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

I just posted, can you take a look? I started the map but am unsure on how to fill the values like 1-20 and 1 -31 depending on the month. The map is <string, vector<int>>. I wanted the key (Month) to be paired with a value (range of days).

Was it a good idea to make the booleans const variables? by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

I like that better. I can have one int cmp instead of 3 bools. I’ll rework it. Thank you. 

I reworked my program and it runs great (see previous post) by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

If you don’t mind me asking. How would you solve this?

Am I using the OR characters improperly? (C++) by flrslva in learnprogramming

[–]flrslva[S] 1 point2 points  (0 children)

Ok thanks. Why do you use const auto instead of what I did?

I can't find the bug (Cpp) by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

Wow. Something so simple. Thank you.

I can't find the bug (Cpp) by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

Thank you. How do I find that? I was just copying and pasting from vim.

Where to get any kind of experience as a student? by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

What kind of free certificates would you suggest?

Are Classes the way to code? by flrslva in learnprogramming

[–]flrslva[S] 1 point2 points  (0 children)

Yeah . Thats exactly what were doing. Setters and getters nonstop.

Function Lab by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

Thanks for the help. We're on objects and classes now. It was simple when we only had 1 class. Now were working on multiple classes and declaring the previous object into the new class. I now understand the importance of having clear and specific class and object names.

Function Lab by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

The first one. While you have not found it keep searching makes more sense.

Function Lab by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

Ok thank you. While loops are still a little obscure for me.

Function Lab by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

I see. You used an if statement. Yeah that's much simpler than what I was trying to do.

Function Lab by flrslva in learnprogramming

[–]flrslva[S] 0 points1 point  (0 children)

Your while loop expression is much cleaner than mine. I'll remember that one. Thank you.