So I'm trying to learn about C++ and integers. I decided a good way to learn is to attempt to make a calculator that does some type of mathematical operation.
I succeeded!
I thought it was kinda cool so why not release the .exe and source to MPGH.
This won't change anything but instead of typing
int a;
int b;
int c;
you can typ int a, b, c;
Originally Posted by jompan18
This won't change anything but instead of typing
int a;
int b;
int c;
you can typ int a, b, c;
@jompan18
Thanks!
Like I said I'm new to C++ so any tips like that are much appreciated.
Approved .
Good job man, you're getting there, not make a full function calculator :P
Great job, remember that practice makes perfect.
Originally Posted by Hero
Approved .
SUP LANCE
Originally Posted by Hannigab
Great job, remember that practice makes perfect.
SUP LANCE
/omfg GAB WHERE U BEEN
You could've done this way:
Code:
int a, b;
cout << "Type the numbers you want to mutiply: " << endl;
cin >> a >> b;
cout << "Result: " << a * b;
Originally Posted by Hero
/omfg GAB WHERE U BEEN
Nigga I can't private message you wat do
Originally Posted by jompan18
This won't change anything but instead of typing
int a;
int b;
int c;
you can typ int a, b, c;
However, if somewhere along the line you decide you need b to be an unsigned int you have to take all that pretty shit apart again.
And you're more likely to do char *pPointer, pYourmam by accident. pYourmam will be a normal char instead of a char pointer.
I personally prefer keeping everything on seperate lines due to the above mentioned reasons.
Originally Posted by Hell_Demon
However, if somewhere along the line you decide you need b to be an unsigned int you have to take all that pretty shit apart again.
And you're more likely to do char *pPointer, pYourmam by accident. pYourmam will be a normal char instead of a char pointer.
I personally prefer keeping everything on seperate lines due to the above mentioned reasons.
if you put everything on its own line, it'll still be safe tho.