Your code has a lot of the { } brackets where not neccessary. They're messing up the whole thing.
Further, you're never inputting the value for "dsecondnumber";
Further, whoever you have those comments from... don't trust them on anything relating to programming. EVER. Again.
int main(int argc, char* argv[]) is the proper form if you want arguments.
int main() if you don't.
Do yourself a favor, and replace that ridiculous
case with some
else if 's.
Quote:
/*Two types of number variables, one is an integer or int, and one is a double*/
|
No.
Int comes in no less than four subtypes:
__int8,
__int16,
__int32,
__int64, and each of those can also be
unsigned, for a total of eight types. the usual
int is the same as
__int32, BTW.
There's also the
bool type, which can also be used in the same fashion as an integer.
There's two types of floating-point values:
float and
double.
Quote:
// char is a character, its how you get plus and minus signs, etc //
|
Char is stored in memory as a hexadecimal representation of the character, with a value corresponding to a given ASCII code. See:
http://www.asciitable.com/
Unicode chars are stored in two bytes, IIRC, while regular Ascii takes up just one byte (same as
__int8)
Try incrementing or decrementing a char and see what happens.
Char can be unsigned too, BTW.
Quote:
/* d needs to be in front of dnumber because the d is a variable for double */
|
Incorrect. It would work just the same if you named it
lulz .