Here it is. I hope you enjoy. You could try to revise the .cpp file and make it advance/better.
Here it is. I hope you enjoy. You could try to revise the .cpp file and make it advance/better.
no response yet?
Y'know... You whine about people getting mad at you for thread bumping, and then you pull this...
-Govtcheez
[email protected]
ok..............whatever
How am I gonna learn new stuff if no one replies to my topics?
I don't know... Out of a book?
-Govtcheez
[email protected]
when you answer your age as less than 10, you get both the messages for <=10 and <=20
and when looking at your code, i notice a whole section that doesnt get executed. its the section that tells the user to email you, etc etc... right after the stalker sub-program.
also, you should impliment something that allows you to return to the main menu from the sub-programs.
otherwise, your program is fine.
I came up with a cool phrase to put down here, but i forgot it...
um
your variable math
make it a long doube, not an int.
Environment: OS X, GCC / G++
Codes: Java, C#, C/C++
AOL IM: neandrake, Email: neandrake (at) gmail (dot) com
ok.........I'll try that
Mreh...
#defining over a keyword?
Really, there's isn't a point...
"your variable math
make it a long doube, not an int."
Why in the hell would he do that?
im not a teen!
anyway i looked at your code and now i know that you read teach yourself C++ in 24 hours
try putting in numbers such as 1938749825725 and 29587459875.... while 'math' is only an int, it can only process numbers between like -2 billion and 2 billion i think...Originally posted by rmullen3
"your variable math
make it a long doube, not an int."
Why in the hell would he do that?
I came up with a cool phrase to put down here, but i forgot it...
how about adding error-checking to the calculator? for instance, if you input any alphabetical character (or string) instead of a number, it quits.
I code.
I think.
Ergo, I think in code.
After a quick test and scanning of the code I have three objections.
1) Redefining the class keyword just obfuscates your code, don't redefine unless there is a real advantage.
2) You don't check for valid input, such as a division by 0. The program chokes on that and it shouldn't. You should print an error to the user and give them another chance or at least warn them before the program dies.
3) Your code isn't portable. C was designed to be generic to all systems that support the language. We as programmers should respect that and write portable code whenever possible. Use implementation defined constructs when you absolutely MUST.
-Prelude
My best code is written with the delete key.