1. ## Few noobie questions.

Well, I looked through a few books, but I'm still missing a few pritty simple things. These are some pritty basic questions that probably have been asked a few times. (Hopefully basic anyways)

First off when you say (!callfunction()) what does the ! do? Is that like: (callfunction()=0)?

How much can a byte/SHORT/int/LONG integer hold (value-wise)?

How do you tell the size of an array? (IE if I had an array with X values, how do I find X?)

Is a 3D array a valid declaration? (IE I[1][20][10]; )

Is it possible to tell where the ConsoleCursor is currently?

If a pointer points to a 0x(0000^8) adress and you keep adding one to the pointer, will it cycle through every value on your computer?

Can you dynamicaly expand an array? (IE: Add an extra value to an array, so from I[10] to I[11]?)

Thank you.

2. >First off when you say (!callfunction()) what does the ! do? Is that like: (callfunction()=0)?
"if ( !something )" is identical to "if ( something == 0 )".

>How much can a byte/SHORT/int/LONG integer hold (value-wise)?
byte isn't a type in C++. You can assume the following ranges:

char: -127 to 127
short: -32767 to 32767
int: -32767 to 32767
long: -2147483647 to 2147483647

>How do you tell the size of an array?
Divide the size of the array--the total size in bytes--by the size of any element of the array:
Code:
`sizeof array / sizeof array[0]`
>Is a 3D array a valid declaration? (IE I[1][20][10]; )
Yes, though an array of size 1 is kind of useless.

>Is it possible to tell where the ConsoleCursor is currently?
Possible yes, not portable, so it depends on your system and/or compiler.
If a pointer points to a 0x(0000^8) adress and you keep adding one to the pointer, will it cycle through every value on your computer?
Uh, in theory yes. In practice, don't count on it.

>Can you dynamicaly expand an array?
No, the size of an array is constant and doesn't change. You can simulate a dynamic array with pointers and dynamic memory though.

3. Byte isint a type in C++? Then why is this a valid declaration??
Code:
`byte enemies;`
I'm confused .

Umm for the array part you said get the amount in the total size of bytes and devide by any part of the array, but what if all the parts of the array are 0? Or, is 0/0 a valid devision process?

Well, thank you very much for your help, it'll... help alot .

4. because you can create an alias for another type.. say...

Code:
```typedef unsigned char byte;
typedef int INTEGER;
typedef char *String;```
Now you can declare variables as:

Code:
```byte b = 1;
INTEGER n = 20;
String s = "Blah";```

5. Originally Posted by Blackroot
How much can a byte/SHORT/int/LONG integer hold (value-wise)?
Exactly CHAR_MIN to CHAR_MAX, or UCHAR_MAX; SHRT_MIN to SHRT_MAX, or USHRT_MAX, INT_MIN to INT_MAX, or UINT_MAX; or LONG_MIN to LONG_MAX, or ULONG_MAX. #include <limits.h> Or #include <climits> (too used to the other board)

Originally Posted by Blackroot
How do you tell the size of an array? (IE if I had an array with X values, how do I find X?)
As stated above, but only when the array name is in scope. If you pass an array to a function, you are only passing a pointer to the first element and such information is lost.

6. For dynamic containers, like an array that can be resized and played with freely..

Check out the STL, vectors are a good way to go for dynamic arrays.

7. Code:
`Is it possible to tell where the ConsoleCursor is currently?`
Compilers supporting conio.h(Borland specially) have function wherex() and wherey() which tells you position of your console cursor

8. >Byte isint a type in C++? Then why is this a valid declaration??
Probably because your compiler decided to add it as an extension. Use it at your own risk though, because the code probably won't compile elsewhere.

>but what if all the parts of the array are 0? Or, is 0/0 a valid devision process?
0/0 isn't valid, but sizeof is guaranteed to never evaluate to 0.