how can i make a calculator using function and procedure..
With all due respect, this is far too broad a question for us to try to answer, even if we were inclined to do the work for you in the first place - which we are not. NathanOliver's answer is about the most any of us can give without a lot more details about what you need to do, and a lot more evidence that you have tried to solve the problem yourself.
Whatr specifically do you need help with? If you are having trouble understanding how functions work, there are plenty of older posts on the subject here; a search should turn up dozens.
// cal_shell.cpp //
using namespace std;
// your functions go here ...??
double add( double a, double b )
return a + b;
double sub( double a, double b )
return a - b;
// ... the rest of your functions go here //
// print out an intro...
// prompt and take in the op requested ...add, sub, etc...
cout << "Which op ... Enter + or - or ... ";
char op = 0;
cin >> op;
double a = 0.0, b = 0.0, c = 0.0; // get some doubles
// now prompt and take into 'a' annd 'b' valid doubles
switch( op )
case '+' : c = add( a, b ); break;
case '-' : c = sub( a, b ); break;
// ... rest goes here ...//
cout << op << " is NOT implemented here yet ...\n";
cout << "for the binary op " << op << " on " << a << " and " << b
<< ", the result returned was " << c << endl;
cout << "All done ... press 'Enter' to cobtinue/exit ... " << flush;
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.