i have this question in mind since i first found out that you can declare and array like this
how does the compiler how much storage to allocate?
i've heard that it doesn't allocate any storage, it just points to some address and when you use index operator like this
it just returns the object n addresses far from the pointer.
if that's so, how does the compiler handle new(exact type of the array) variables declaration without risking an overriding of the memory:
int* nArray; // lets assume that it points to address 0x00000000 int nInt; // has the address of 0x00000004? // that would mean like nArray + 1 points to nInt witch doesn't seem to be right