Thread: Please test my calculator prog

  1. #16
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Thnx. That helps a lot. Never knew that. So, it'll do nothing to the output or whatnot? Kool. But, is there really anyway to fix it (besides the way you showed me)?

  2. #17
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    well i don't think it will effect the output because if i member rite both float and double show the decimal point.

  3. #18
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Ok, kool. Thnx. Does it work right for anyone that's not on XP?

  4. #19
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    Yes, it does work on everybody's computer. It's a standard c/c++ practice (it's probably even a standard programming in general practice; I don't know). It is called casting a variable, though.

  5. #20
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Ok, thnx. Just wondering, but would me program work for Linux also (or any other OS that isn't Window$)?

  6. #21
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    I haven't look at your source code, so I wouldn't know. It really all depends on whether you are using Windows specific functions or not.

    This recent thread about portability has a very good explanation concering portability by Prelude. She gives an example of a smart way to make your program easily portable.
    Last edited by TechWins; 10-05-2002 at 01:33 PM.

  7. #22
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Originally posted by TechWins
    I haven't look at your source code, so I wouldn't know. It really all depends on whether you are using Windows specific functions or not.

    This recent thread about portability has a very good explanation concering portability by Prelude. She gives an example of a smart way to make your program easily portable.
    Ok, thanks. I'll take a look at that.

  8. #23
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Here's a new version. Added a few new features, fixed a couple of bugs, and some other stuff.
    The features I added are:
    1. Save/load. It saves the version number, extension, and label for comparision. The load feature has a bug, but I can't fix it (Doesn't display the label).

    2. Right triangle. Let's you figure out if the given three values will make a right-triangle.

    3. Square root. Figures the squared root of the number.

    Note that R.T. means "Right Triangle". I abbriviated it for menu purposes (which has been changed). There could be more options I didn't list here *I can't remember right off hand what the other version had*. I also added a credits list in the readme file.

  9. #24
    Registered User red_baron's Avatar
    Join Date
    May 2002
    Posts
    274
    pretty cool, but what you can do before you keep adding more stuff is like have the program get a string line, for example a person can enter:

    2+4+2+3

    and it will give u the answer : 11, your program would just have to find the operation signs and the different numbers and basically find the answer, this will probably get very complicated when u have to start doin bedmass stuff and use brackets, etc. but it would be real cool

    nice job btw
    ¿Red Baron?

    "Imagination is more important than knowledge"
    -Albert Einstein (1879-1955)

    Check out my games!

    [code] /* dont forget code tags! */ [/code]

  10. #25
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Originally posted by red_baron
    pretty cool, but what you can do before you keep adding more stuff is like have the program get a string line, for example a person can enter:

    2+4+2+3

    and it will give u the answer : 11, your program would just have to find the operation signs and the different numbers and basically find the answer, this will probably get very complicated when u have to start doin bedmass stuff and use brackets, etc. but it would be real cool

    nice job btw
    Ok, I ain't feelin all that great today, so can u please run that string line thing past me one more time **. But, sure. I'll give it a try. Would anyone know how to do matrice input *I know how to add them and stuff, just dunno how I would let the user input the values*

    P.S> Thnx. Good job on ur games to

  11. #26
    Registered User red_baron's Avatar
    Join Date
    May 2002
    Posts
    274
    ok basically the caclulator would ask you to enter a string of numbers and the calculation to process for each one so instead of asking you to enter 1 number each time you could enter something like this:

    1+2*12-16/4

    and it would calculate the whole thing, so it would first do the multiplication:

    1+24-16/4

    then the division

    1+24-4

    and finally the addition and subtraction

    21

    and thats it!

    hope you get well soon
    ¿Red Baron?

    "Imagination is more important than knowledge"
    -Albert Einstein (1879-1955)

    Check out my games!

    [code] /* dont forget code tags! */ [/code]

  12. #27
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Originally posted by red_baron

    and thats it!

    hope you get well soon
    Ok, thnx. That cleared it up. It'll get work on that as soon as I can *which will probably be soon*.

    P.S> thnx, me to

    P.P.S> Anyone know any FREE host that allows PHP or CGI? I don't want AngelFire, Lycos, or Tripod *already tried to sign up, but never worked* I know it's a bit off topic, but I want a better host then GeoCities.

  13. #28
    Registered User red_baron's Avatar
    Join Date
    May 2002
    Posts
    274
    http://www.tripod.lycos.co.uk

    they have a really cool one the best that i know of...
    ¿Red Baron?

    "Imagination is more important than knowledge"
    -Albert Einstein (1879-1955)

    Check out my games!

    [code] /* dont forget code tags! */ [/code]

  14. #29
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Thnx...I'll try them out.

  15. #30
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    This is better than the crappy calculator I wrote when I started C++... Good job!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Integer Emulation
    By Elysia in forum C++ Programming
    Replies: 31
    Last Post: 03-18-2008, 01:03 PM
  2. undefined reference
    By 3saul in forum Linux Programming
    Replies: 12
    Last Post: 08-23-2006, 05:28 PM
  3. C++ Operator Overloading help
    By Bartosz in forum C++ Programming
    Replies: 2
    Last Post: 08-17-2005, 12:55 PM
  4. MSVC Template Constructor/Assignment Errors
    By LuckY in forum Windows Programming
    Replies: 3
    Last Post: 07-22-2005, 02:57 PM
  5. Why is my program freezing?
    By ShadowMetis in forum Windows Programming
    Replies: 8
    Last Post: 08-20-2004, 03:20 PM