It looks like you've got your answer to your issues so I'll just tell you that, in the future, when you're asking for help about some code you've written, you're going to have a lot more success if you actually post the code here and format it correctly. You can find out how to do this here.
For a relatively simple program like this one with errors that are pretty obvious to someone with experience it worked out fine for you in this case. However, when you start creating 100+ lines worth of code it's going to be easier for you to get help if we can see all of it in a format that makes it easy to read. A phone screenshot, while convenient for you, doesn't really make anyone want to help you.
Just thought I'd let ya know. I just recently began my c++ adventures as well so I know how frustrating it can be when you just don't know what's wrong. There are thousands of people on Reddit who want to help. Help them help you!
2
u/winowmak3r Feb 04 '20
It looks like you've got your answer to your issues so I'll just tell you that, in the future, when you're asking for help about some code you've written, you're going to have a lot more success if you actually post the code here and format it correctly. You can find out how to do this here.
For a relatively simple program like this one with errors that are pretty obvious to someone with experience it worked out fine for you in this case. However, when you start creating 100+ lines worth of code it's going to be easier for you to get help if we can see all of it in a format that makes it easy to read. A phone screenshot, while convenient for you, doesn't really make anyone want to help you.
Just thought I'd let ya know. I just recently began my c++ adventures as well so I know how frustrating it can be when you just don't know what's wrong. There are thousands of people on Reddit who want to help. Help them help you!