Help - Search - Members - Calendar
Full Version: C++ Calculator
Sal's RuneScape Forum > Everything... Not RuneScape > Tech Talk > Programming & Web Development
Shade Pure
You might remember a while ago, I asked for advice on making a C++ calculator, now I want to take on that project again... I still suck at programming but could this work?

CODE
string choice;
cin >> choice;
char ch = choice[0];
ch = toupper(ch);
switch (ch) {
     case 'A':
          // stuff...
          break;
     case 'B':
           // stuff...
           break;
     case 'C':
           // stuff...
           break;
     case 'D':
           // stuff...
           break;
}
cjgone
Yes, but it's horribly ineffecient.
Shade Pure
QUOTE (cjgone @ Aug 31 2009, 01:40 PM) *
Yes, but it's horribly ineffecient.


Can you post some efficient code that I could use? I'm really new to programming, especially C++ sad.gif.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.