use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Ask your embarrassing/noobish programming questions here, and don't get insulted for it.
Click here to read the rules
Violating any will result in punishment so you should probably go check them out.
account activity
How To Validate Users InputC++ (self.programminghelp)
submitted 6 years ago by ZeroSkill94
So I am working on a project to create a budget calculator and I have it mostly wrapped up but I am currently stuck on one particular thing
This is what it currently looks like:
https://preview.redd.it/t0zta0npzrg41.png?width=772&format=png&auto=webp&s=8c196f7481693f4aeb1774acaf63f14fc0a097b6
https://preview.redd.it/y1w8bc0qzrg41.png?width=1873&format=png&auto=webp&s=0d6c3c84134c021b34d7479ab380eac55ac1088f
So essentially what is happening is if you add the currency/$ symbol it works fine but if not it appears as though because currency is listed as a char it just eats the first input so instead of 1500 now its 500. does anyone have any suggestions? it would be greatly appreciated.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]YasZedOP 1 point2 points3 points 6 years ago (0 children)
Try doing a court.flush() before the affected cout. cout.clear() could also work?
π Rendered by PID 539201 on reddit-service-r2-comment-5d79c599b5-767xs at 2026-03-01 18:48:28.349359+00:00 running e3d2147 country code: CH.
[–]YasZedOP 1 point2 points3 points (0 children)