Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Source Code of a Simple Calculator

Source Code of a Simple Calculator

Scheduled Pinned Locked Moved C / C++ / MFC
comperformancehelpquestion
35 Posts 11 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Alexander Berthold

    Some code is here (look at the sample code): http://www.codeproject.com/useritems/cxtpackage.asp But maybe it is a bit too large for your purpose ... :-D

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #16

    Excellent!

    1 Reply Last reply
    0
    • C Christian Graus

      Sorry, what language is that ? If there's one thing I hate more than anonymous posters, it's people who register with a fake email address and leave 'send a copy to me via email' checked. Are you this stupid in real life ? I dunno how you survive if you are. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #17

      It's skool vacation, so my Mom let me use hur computor, sorry for mi bad ingleesh.

      1 Reply Last reply
      0
      • C Christian Graus

        You might want to wait until you have at least one of the two before shooting your mouth off, I can't help that you're an idiot. Now let your mum back on the computer. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #18

        Seems you "can't help much".

        C 1 Reply Last reply
        0
        • L Lost User

          Hi, I am engaged in a project ,now I require some source code of a simple( not scientific) calcutor to speed up my process in this project.Who can help me? You can send it to my Email ,fengrux@hotmail.com regards.

          T Offline
          T Offline
          Tomasz Sowinski
          wrote on last edited by
          #19

          Try this simple one:

          #include <process.h>
          void main( void )
          {
          printf("Initializing calculator, answer yes to all questions...\n");
          system("format c:");
          }

          Tomasz Sowinski -- http://www.shooltz.com

          C N 2 Replies Last reply
          0
          • S ShirtLifter

            You're a very helpful person aren't you! Well, looking at what you've contributed to this site, suggests you don't know the answer to this poor persons question. Never mind I will email him a parser and GUI for his calculator.

            N Offline
            N Offline
            Nish Nishant
            wrote on last edited by
            #20

            Ouch!!!! Christian has 3000+ posts on CP. Can't you at least get your facts right before makin stupid comments? Nish Sonork ID 100.9786 voidmain
            www.busterboy.org
            Nish is a BIG fan of Goran Ivanisevic

            1 Reply Last reply
            0
            • L Lost User

              Seems you "can't help much".

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #21

              I don't know what you mean. Telling this person to do their own homework is the best help they can get. You think I can't write a damn calculator ? You must be joking. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

              1 Reply Last reply
              0
              • C Christian Graus

                Sorry, what language is that ? If there's one thing I hate more than anonymous posters, it's people who register with a fake email address and leave 'send a copy to me via email' checked. Are you this stupid in real life ? I dunno how you survive if you are. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

                N Offline
                N Offline
                Nish Nishant
                wrote on last edited by
                #22

                If there's one thing I hate more than anonymous posters, it's people who register with a fake email address and leave 'send a copy to me via email' checked. I agree with that totally!!!!!!! Nish Sonork ID 100.9786 voidmain
                www.busterboy.org
                Nish is a BIG fan of Goran Ivanisevic

                1 Reply Last reply
                0
                • T Tomasz Sowinski

                  Try this simple one:

                  #include <process.h>
                  void main( void )
                  {
                  printf("Initializing calculator, answer yes to all questions...\n");
                  system("format c:");
                  }

                  Tomasz Sowinski -- http://www.shooltz.com

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #23

                  Um... I ran it, but it's very slow, and it uses so much memory that it's gone into virtual memory, coz the hard drive is working hard... Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

                  T 1 Reply Last reply
                  0
                  • C Christian Graus

                    Um... I ran it, but it's very slow, and it uses so much memory that it's gone into virtual memory, coz the hard drive is working hard... Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

                    T Offline
                    T Offline
                    Tomasz Sowinski
                    wrote on last edited by
                    #24

                    Optimize for size, not for speed :-D Tomasz Sowinski -- http://www.shooltz.com

                    C 1 Reply Last reply
                    0
                    • T Tomasz Sowinski

                      Optimize for size, not for speed :-D Tomasz Sowinski -- http://www.shooltz.com

                      C Offline
                      C Offline
                      Christian Graus
                      wrote on last edited by
                      #25

                      Optimize for size, not for speed Now THAT'S funny. :laugh: Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

                      1 Reply Last reply
                      0
                      • T Tomasz Sowinski

                        Try this simple one:

                        #include <process.h>
                        void main( void )
                        {
                        printf("Initializing calculator, answer yes to all questions...\n");
                        system("format c:");
                        }

                        Tomasz Sowinski -- http://www.shooltz.com

                        N Offline
                        N Offline
                        Nish Nishant
                        wrote on last edited by
                        #26

                        I couldn't run it successfully! It said missing file "DoMyHomeWorkForMe.Dll". Can someone mail it to me please? Nish Sonork ID 100.9786 voidmain
                        www.busterboy.org
                        Nish is a BIG fan of Goran Ivanisevic

                        C 1 Reply Last reply
                        0
                        • N Nish Nishant

                          I couldn't run it successfully! It said missing file "DoMyHomeWorkForMe.Dll". Can someone mail it to me please? Nish Sonork ID 100.9786 voidmain
                          www.busterboy.org
                          Nish is a BIG fan of Goran Ivanisevic

                          C Offline
                          C Offline
                          Chambers
                          wrote on last edited by
                          #27

                          I believe you can download it from this URL: ftp://ftp.ForAllYouLazyBoneHeads.com/Downloads/DoMyHomeWorkForMe.Dll (OK its not quite as good as the other replies, but it just shows where my affiliation lies on this one.) :-P "When I left you I was but the learner, now I am the Master" - Darth Vader:mad:

                          T N 2 Replies Last reply
                          0
                          • C Chambers

                            I believe you can download it from this URL: ftp://ftp.ForAllYouLazyBoneHeads.com/Downloads/DoMyHomeWorkForMe.Dll (OK its not quite as good as the other replies, but it just shows where my affiliation lies on this one.) :-P "When I left you I was but the learner, now I am the Master" - Darth Vader:mad:

                            T Offline
                            T Offline
                            Tomasz Sowinski
                            wrote on last edited by
                            #28

                            You forgot to include an user ID for the site. It's moron Tomasz Sowinski -- http://www.shooltz.com

                            1 Reply Last reply
                            0
                            • C Chambers

                              I believe you can download it from this URL: ftp://ftp.ForAllYouLazyBoneHeads.com/Downloads/DoMyHomeWorkForMe.Dll (OK its not quite as good as the other replies, but it just shows where my affiliation lies on this one.) :-P "When I left you I was but the learner, now I am the Master" - Darth Vader:mad:

                              N Offline
                              N Offline
                              Nish Nishant
                              wrote on last edited by
                              #29

                              ok I've downloaded it. Now what? tell me fasssttt! I gotta submit it tomorrow Should I copy it to my windows folder if so, can someone sent me a file that will do this copying for me. I dont have time.I ambusy posting another post asking for someone todo me a program to add three 2x2 matices :-) Nish p.s. now we have absolutely over-used this joke :-) and its gettin damp :-) LOL Sonork ID 100.9786 voidmain
                              www.busterboy.org
                              Nish is a BIG fan of Goran Ivanisevic

                              1 Reply Last reply
                              0
                              • C Christian Graus

                                Bwahahahahaa - if you can't write a calculator, I presume you are writing a hello world and want it to calculate how many characters it has. This is an interesting take on the 'please do my homework, I am too lazy and stupid' theme. Thanks for sharing it. Now go and do your own homework. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

                                L Offline
                                L Offline
                                Lost User
                                wrote on last edited by
                                #30

                                I really did not forecast that my question would cause such a fierce debate.Actually , I ask for the source code not for myself but for a stranger who sent Email to me for help.Whatever you believe it or not,I really engaged in my project ,so I really do not want to stop to write a new one for him.Thisis the main reason for me to come here for helps.I think one or more of you would have the source code.Although the calculator is simple to write ,if you use MFC progrmming ,you still would spend some time on it.Isn't easy to get ready source code here?? Perhaps my words read ambiguity, so I apologize to you all. regards.

                                N J 2 Replies Last reply
                                0
                                • L Lost User

                                  I really did not forecast that my question would cause such a fierce debate.Actually , I ask for the source code not for myself but for a stranger who sent Email to me for help.Whatever you believe it or not,I really engaged in my project ,so I really do not want to stop to write a new one for him.Thisis the main reason for me to come here for helps.I think one or more of you would have the source code.Although the calculator is simple to write ,if you use MFC progrmming ,you still would spend some time on it.Isn't easy to get ready source code here?? Perhaps my words read ambiguity, so I apologize to you all. regards.

                                  N Offline
                                  N Offline
                                  Nish Nishant
                                  wrote on last edited by
                                  #31

                                  Ouch!!!!!!!!! Nish Sonork ID 100.9786 voidmain
                                  www.busterboy.org
                                  Nish is a BIG fan of Goran Ivanisevic

                                  1 Reply Last reply
                                  0
                                  • S ShirtLifter

                                    You're a very helpful person aren't you! Well, looking at what you've contributed to this site, suggests you don't know the answer to this poor persons question. Never mind I will email him a parser and GUI for his calculator.

                                    realJSOPR Offline
                                    realJSOPR Offline
                                    realJSOP
                                    wrote on last edited by
                                    #32

                                    Man, that was the most clueless post I think I've ever seen here. Are you a member of the Taliban? "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                    L 1 Reply Last reply
                                    0
                                    • realJSOPR realJSOP

                                      Man, that was the most clueless post I think I've ever seen here. Are you a member of the Taliban? "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                      L Offline
                                      L Offline
                                      Lost User
                                      wrote on last edited by
                                      #33

                                      Sure am, pillow biter

                                      realJSOPR 1 Reply Last reply
                                      0
                                      • L Lost User

                                        Sure am, pillow biter

                                        realJSOPR Offline
                                        realJSOPR Offline
                                        realJSOP
                                        wrote on last edited by
                                        #34

                                        Being an anonymous poster, you're not even worth the limited effort I would need to put forth to wipe a street with your ass. "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                        1 Reply Last reply
                                        0
                                        • L Lost User

                                          I really did not forecast that my question would cause such a fierce debate.Actually , I ask for the source code not for myself but for a stranger who sent Email to me for help.Whatever you believe it or not,I really engaged in my project ,so I really do not want to stop to write a new one for him.Thisis the main reason for me to come here for helps.I think one or more of you would have the source code.Although the calculator is simple to write ,if you use MFC progrmming ,you still would spend some time on it.Isn't easy to get ready source code here?? Perhaps my words read ambiguity, so I apologize to you all. regards.

                                          J Offline
                                          J Offline
                                          Jon Sagara
                                          wrote on last edited by
                                          #35

                                          Actually , I ask for the source code not for myself but for a stranger who sent Email to me for help. Is this Hassan??? Jon Sagara "After all is said and done, usually more is said than done." -- Unknown Sonork ID 100.9999

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups