Quote:
If we run the following on the command line:
myBigProgram.exe -l 66 -n program.txt
It will look like this:
argc = 5
argv[0] = "myBigProgram.exe";
argv[1] = "-l"
argv[2] = 66
argv[3] = "-n"
argv[4] = "program.txt"
argv[0][0] = 'm'
argv[0][1] = 'y'
argv[0][2] = 'B'
argv[0][3] = 'i'
argv[0][4] = 'g'
argv[0][5] = 'P'
argv[0][6] = 'r'
argv[0][7] = 'o'
argv[0][8] = 'g'
argv[0][9] = 'r'
argv[0][10] = 'a'
argv[0][11] = 'm'
argv[0][12] = '.'
argv[0][13] = 'e'
argv[0][14] = 'x'
argv[0][15] = 'e'
argv[1][0] = '-'
argv[1][1] = 'l'
argv[2][0] = '6' //Is this right, it is a number
argv[2][1] = '6' //Is this right, it is a number
argv[3][0] = '-'
argv[3][1] = 'n'
argv[4][0] = 'p'
argv[4][1] = 'r'
argv[4][2] = 'o'
argv[4][3] = 'g'
argv[4][4] = 'r'
argv[4][5] = 'a'
argv[4][6] = 'm'
|
You've got it right missy!
A- O.K. (couldn't be better, and I'm not saying that just because you have a nice a.. hmmm avatar).
Actualy doesn't matter if you type a number ... the system still reads it as a char ... later on you convert it with atoi() atof() etc. depending on what kind of num it is...
Quote:
You mean -min/2 ...
It's OK. I know you are tired!
|
once again...
no explanation required... you get the point...I'm still tired.
Refers to min and max values for signed chars... DaggerHex_Flyn calculated using binary values and the rule called "two's compliment" that the min value is -128 and max is 127...
(easiest explanation is that you have 256 available values when using 8 bits, out theese 256 values one of them has to be zero therefore it's not possible to have the same number of positive and negative values... thus 127)
If i wasn't clear ... no wories You realy don't need to know or understand this at this point... And if you do, good for you... now quickly forget it (format your drive ) or you'll have nightmares...I know i do... :blink: