Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And as for that $500 billion slush fund that Congress will oversee (as laid down in the bill passed by Congress and the Senate)? Trump basically said f**k you - I'll decide where the money goes and I'm not going to tell you where that is.

rproffitt commented: I've read the checks will have DJT's signature. Isn't it 2 trillion dollars? Also, "appreciate me" orelse. Next vow fealty, hang DJTportraits in home. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And to think I wasted the last few years of my programming career actually writing code. If only I'd known I could've just posted the specs here and gotten someone else to write the code for free.

AndreRet commented: Hahahaha, Indeed! +14
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

No comma before where in SQL.

That's likely it but as a rule I like to see the actual query. I find it hard to visually scan a line that has multiple brackets, variables, concatenators and single and double quotes and other delimeters.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And you expect someone here to do your homework for you? That's not going to happen. Show us that you have put some effort into doing this yourself. If you are stuck we will try to help you out.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Several problems just off the top

  1. You aren't initializing noTimesRolled
  2. in several for loops you aren't initializing n
  3. You declare Die[5] which means 0-4 but later you index it by 5.
  4. Why to you pass DiceToRoll to RollDice when it isn't used?
  5. Make sure you are using either a var or a pointer for DiceToRoll but not both

Your biggest problem is the complete lack of comments to say what your code is supposed to be doing.

Fix these problems and get back to us.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Look at your error message. The else on line 33 doesn't have a matching if. The if on line 25 matches with the else on line 29.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Do you know Count Count?

I'm a big fan.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Pleased to meet you. My grandparents were from the Netherlands. You are a de Groot. I'm a de Graaf.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Can anyone explain to me how suspending EPA regulations is in any way an appropriate thing to do at any time, let alone during a pandemic?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A person of few words. Welcome to Daniweb.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

RE: Allocation of Covid-19 resources...

“He calls all the governors,” Trump said. “I tell him, I mean, I’m a different type of person. I say Mike, don’t call the governor of Washington, you’re wasting your time with him. Don’t call the woman in Michigan.”

“If they don’t treat you right, I don’t call,” Trump said.

Translation - That's a nice state you have there. Be a shame of something were to happen to it.

Trump is now openly running the country's largest protection racket.

rproffitt commented: 5 dollar a barrel oil from Canada? +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Test for tries >= 10 at the top. As well, replace the literal 10 with a const like MAXTRIES and but a break after the "you lose" statement so you break out of the while loop.

Basically

do {
    if (++tries > MAXTRIES) {
        cout << "You Lose!Correct Answer is:" << iNum << endl;
        break;
    }

    if () {
        .
    } else if () {
        .
    } else if 

    etc.
Dilshan_2 commented: Thank You for the help +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I copied your code from the external site and pasted it into the thread. If you post it on an external site then we have to leave Daniweb to look at it and there is no guarantee it is a safe site. Also, if the code eventually disappears from that site then this thread becomes useless for anyone else.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That could be something as simple as an instance of the program is already running. The compiler can't write a new Yahtzee.exe if it is in use.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Please be kind enough to describe the problem. If it won't compile then post the error and the line that generates it. If it errors out while running then do the same. If it is running but not doing what you want then describe it like "when I do X the program does Y but it should do Z". Get the picture?

Dilshan_2 commented: please refer below comment +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Medical supply vendors have been told to NOT send supplies to Michigan. Trump had recently been on Fox telling Sean Hannity that Michigan's governor, Gretchen Whitmer, had been "insufficiently grateful" for his assistance. During the session Trump also added "I love the people of Michigan."

Trump has a hissy fit and innocent people die. Why is this piece of filth still president?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

In Lancaster, California, a 17-year-old has died after being turned away from one facility because he lacked health insurance.

Best health care system in the world. As long as you are rich. Get ready to see a lot more of this. The Canadian health system is likely going to be overwhelmed by this as well but at least nobody will be told "I'm sorry but we can't treat you unless you can pay."

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

So far so good. Hunkered down with lots of food in the freezer and we're far away from the worst centres. How about you?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Pleased to meet you. Welcome to Daniweb. How are you managing during the outbreak?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I haven't had a look at this code in some time. After I discovered the excellent free utility Everything Indexer I no longer needed it. Everything does, well, everything I had coded and so much more. It integrates with Explorer and has almost instantaneous response.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What do you need help with?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That's unfortunate. Please pass on my best wishes if you should happen to be talking.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And that's all Trump really wants - someone else to lay the blame on.

In case there are any doubts about this, in a tweet this afternoon your liar in chief said

The LameStream Media is the dominant force in trying to get me to keep our Country closed as long as possible in the hope that it will be detrimental to my election success. The real people want to get back to work ASAP. We will be stronger than ever before!

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I admit I know next to nothing about how the economy works. But it seems to me that a business has different types of costs. Let's take the bowling alley. The costs are

  1. Salaries
  2. Mortgage/lease
  3. Utilities
  4. Taxes

Our relief program here in Canada guarantees everyone $2000 per month for the next four months so if the owner has to lay off all staff they would still be getting money for necessities (as would the owner). If the government legislated an amnesty on mortgages/leases then that would eliminate the second expense. Utilities could be a problem but that could be taken care of by

  1. Lower cost because of less demand on water/lights/power/etc.
  2. Government relief payments

But what about the businesses that need the money from the mortgages/leases not being paid? Those payments are based on market value which does not reflect the actual value. What damage would be caused to a bank if it stopped getting mortgage payments for some months? Are they actually out any money? The money is still owed. The debt does not disappear. If your friend owes you $20 and says "I can't pay you this month but I can pay you next month", are you really that hard done by? As long as you have money for your own needs what actual harm is done?

That leaves taxes. If the bowling alley goes belly up then the government gets no taxes. They coud seize the building for taxes owed but what good …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

So you want the government to just give you money? Unless you can prove you don't need it that would be a handout (socialism). Unless you were a super-rich corporation, in which case that would be a stimulus instead of a handout. Please understand this is sarcasm. I really want you to get some financial help getting through this. I believe that a Democrat controlled Congress will have a difficult time getting a proper relief bill through the GOP controlled Senate. All the GOP has to do is attach something like a $500 billion slush fund to the bill and then blame the do-nothing Democrats when it fails to pass. And that's all Trump really wants - someone else to lay the blame on.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A bill has been introduced into the Senate that provides relief to businesses, specifically excluding any business owned or operated by any member of Congress, the Senate, the White House, or by any family members of the same bodies. Any bets on whether the Senate passes it?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Right wing people who see this as a problem are not suggesting that we let any person die to keep the books balanced. We are suggesting that businesses are going to be the first to die, and that will have long term consequences on the economy.

They are suggesting exactly that. And not just suggesting - it has been explicitly stated. They want people to go back to work to keep the economy going. This will cause even more spreading and cost the system even more long term. I realize that there is no solution that does not result in some businesses closing and some loss of life. But Trump's solution which he has stated as "a miracle will happen and it will all go away" is just insane.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

In this statement, you proved your point that your first statement is your interpretation of what the right are saying, and not what they are actually saying.

Trump said he would drain the swamp. He's done nothing but hire the types of people he said he'd eliminate. Hs administration is the most corrupt in history.

Trump said he'd replace the ACA with something better. All he's done is try to repeal it. not replace it.

Trump said he'd end ISIS/Taliban quickly after getting elected. Still waiting.

The GOP repeatedly said, regarding health care, that they would protect people with pre-existing conditions. Every bill they have put forward does the opposite.

Trump said he'd eliminate the deficit quickly. Instead he gave his buds a trillion dollar plus tax break and it's exploded.

We are living in opposite land.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I admit that at least for today I have nothing better to do than rant here. I think I'll read a book in the hot tub and relax for a bit.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Imagine you are the mother of three healthy children. You are doing fine financially and making end meet. Then one of your kids gets injured and needs immediate and expensive surgery. You live in the US and your insurance company has found a loophole to deny you coverage. Do you decide to go into debt to save your child (hoping that you can pay off the debt down the road) or do you let the child die so you can keep the books balanced and your credit rating intact?

Our Prime Minister said screw the bottom line, and allocated $81 billion for immediate relief during the crisis. He is urging peope to stay in their homes to contain the spread. Your leaders want to send seniors back to work and pack the churches.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

$2.4 trillion long-term price tag for the Iraq war. The cost for Afghanistan is about $2.4 trillion to date.

I recall reading that the US defense budget is greater than the other top 17 countries combined and the Pentagon has yet to produce an accounting of how that money is spent. You don't think some of that could be diverted into homeland relief efforts? You are willing to go into debt to kill people in other countries but not save lives in your own?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Trump just announced that he wants to see the churches packed on Easter Sunday and he can now see light at the end of the tunnel. Also just in - 9 out of 10 Republicans say Trump is the most reliable source of accurate information on coronavirus, and more see him as more accurate than the Center for Disease Control and Prevention. Trump's "spiritual" advisor blames Covid-19 on gays and the environmentalists.

Common sense and reasoning have left the building. Your country is so f**ked.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I’m simply pointing out the current disagreement going on between the left and the right.

Let's see. The Left wants a comprehensive aid package with details clearly spelled out while the Right wants a half trillion dollars to spend however they want with no oversight. Congress is supposed to control the purse but the Right will do anything to abrogate that right (as long as Democrats control the House).

The right are focused on getting small and mid-sized businesses with huge fixed overhead costs to survive through their forced closures so they don’t go bankrupt in the meantime and can go back to employing people once this is all over.

At least that's what they say. They have a long history of doing pretty much the opposite of what they say.

Trump’s solution is to just put an end sooner rather than later to forced business closures, public health be damned.

That's it in a nutshell (and I picked that metaphor deliberately). Trump just wants good numbers to carry him through the next election and human lives be damned. He is an ignoranus (both ignorant and an asshole).

Then the people whose only source of income is commercial rent, such as my grandma, would not be able to put food on the table, and would clean out their retirement savings, after paying huge property taxes and mortgages on their real estate holdings.

So suspend those payments and do what …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Show us your code.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I have no way of calculating the cost of that as compared to a trillion dollar bailout like from 2008. The alternative is to let them collapse. Or are you suggesting we save (in your words) "people like me" and let everyone else sink? What would happen if the government legislated a temporary suspension of lease payments?

or a good use of taxpayer dollars

Susan Collins argued (before this all hit the fan) that is wasn't a good use of taxpayer dollars (about $800 million) to prepare for a possible pandemic. Trump thought that having a pandemic department in DHS was also a waste of taxspayer dollars.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The government just granted Gilead Sciences a seven year monopoly on the anti-viral, remdesivir which is used to treat ebola and may prove effective for Covid-19. Orphan status is usually granted for drugs developed to treat rare (fewer than 200,000) conditions. This is done to guarantee a fair return on investment. Without the orphan status designation drug companies would have no incentive to develop treatments. In the case of remdesivir, the status had to be granted quickly before the number of US cases exploded past the threshold. This deal prevents generic forms of remdesivir from being developed and allows Gilead to set prices. This is especially galling for at least two reasons

  1. Gilead Sciences received more than $79 million in government money to develop remdesivir
  2. One of the members of Trump's Covid-19 task force worked for Gilead for 6 years as a lobbyist

And even if Trump says the treatment will be free for all, that would still mean the treatment still costs $$$ but tax money would be used to pay for it. Gilead would get massive piles of tax dollars. And that would lead to more cuts to social services, medicare, medicaid, SNAP, etc.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'm saying you should get a break, but not in the form of bags of cash. Relief could come in the form of the government covering your monthly lease. That would keep you afloat and guarantee that the money was being used as intended.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Do we help these people with a few thousand dollars a month to get them by so they won't lose their homes?

Short answer - yes.

Longer answer - well, if the GOP got its way the big corporations (that make the big donations) would get all the money with the usual "trickle-down" promises. After all, they got all the tax cuts. They are also the recipients of the benefits of socialism. Except the GOP doesn't call it socialism. They use the other S word - stimulus.

So if you want to keep the economy humming do you give the money to the corporations (remember - the last time this was done, the money was used to buy back stocks) or do you give it to the people who will spend it? Granted, this is a different situation because people are less able to get out and spend, but even giving it to local businesses won't work because most of them will be closed and the money can't trickle down from them either. Winnipeg bars, for example, are closed. The only restaurants that are still open are those that prepare meals for delivery so in that case it makes more sense to give the money to the people who will then turn around and order food. That keeps the money in circulation.

How about declaring a mortgage/lease amnesty? All payments suspended for the duration.

I recall the cynic's definition of "trickle-down". We give all the money to the …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

So how about, instead of trying to get a $500 billion slush fund that would be used with absolutely no oversight (likely to reward Trump's friends and/or punish his enemies) they put aside $500 billion toward relief for people like you who need it to pay mortgages/rent/bills/etc.? Of course, that would be Socialism and obviously a no-no.

As I recall, the last big bailout gave money to the banks when it could have gone to the people who lost their houses. That way they could have kept their houses and the banks would still have gotten their money.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Can't fix it if we don't know what's broken.

user287961 commented: My bad,on line 21,22 it says"error C4700 : uninitialized local variable used" +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A few years ago the GOP was screaming "death panels" during the Obamacare discussions. The idea that the gov'mint would decide which seniors were not fit to live was unacceptable to the party of Reagan. But now the party of Trump is quite willing to sacrifice millions to keep the economy going (at least until after the election). Ancient tribes would sacrifice virgins to assure good weather and healthy crops. Now we are sacrificing seniors for a healthy Wall Street?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If a killing type of virus strain should suddenly arise by mutation … it could, because of the rapid transportation in which we indulge nowadays, be carried to the far corners of the earth and cause the deaths of millions of people. — W. M. Stanley, in Chemical and Engineering News, Dec. 22, 1947.

Still say nobody saw this coming?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It would be improper for any app to force itself to be the active application.

Even though Windows does this all the time.

rproffitt commented: "Hey, hey, look at me!" Also, nice to read that someone else calls Windows an app. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you read the Daniweb Posting Rules and Suggestions For Posting Questions you'd already know that we need to see proof of effort. Show us what you have done so far. If you have a specific problem then please indicate what it is and we will try to help. Your odds of getting quality help are in proportion to the quality of information you provide.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You could do that, or you could just do

Button1.Enabled = CheckBox1.Checked

Why write five lines of code when one is shorter and clearer?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Lakeworth Florida’s Mayor, Pam Triolo, passes a resolution to shut off power to 52 families who were unable to pay their utility bill and then adjourns the meeting (against the rules) before dissenting opinions can be heard.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think it's much more important to learn how to formulate a plan first. I've taught intro classes and the first thing I did was to get the students to write down in English a step by step process for a problem, in general terms, as if they were describing it to a complete idiot. Before writing a single line of code they had to know how to break down a bigger problem into smaller problems, and how to describe a detailed procedure for each smaller program.

You don't need to know anything about memory management for that, or which order bytes are stored in, or any of the other underlying cruft. I believe that such details can just overwhelm the average beginner.

I found a good, non-programming example of writing out a process was to describe to someone who had never seen shows or shoelaces, exactly how to tie a bow knot.

Diafol might appreciate this analogy - imagine that the only language you spoke was English. If you had to learn a second language, and given a choice between the following two, which would you pick:

  1. Esperanto (constructed with consistent rules)
  2. Welsh (looks like someone swallowed a keyboard and then puked)
rproffitt commented: Excellent. One of the best non-programming courses I took over the years was Systems Analysis. No coding in that class. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I disagree with Dani. I think C++ is a terrible first language for learning the fundamentals of programming and algorithm design. I think Python is much better for that. With C++ you have to be too concerned with the underlying structure of the machine. You shouldn't have to worry about how strings are stored, null termination, pointers as opposed to variables, etc. when learning the fundamentals. Develop good programming habits first. Learn the "how" before the "why". Learn to walk before you learn to fly.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you are stuck for a good (and relevent) book to read while shut in I recommend Earth Abides by George R Stewart.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Although you should never code

If True Then Button1.Enabled = True

which is equivalent to

Button1.Enabled = True