vector 'delete' knows the amount of memory to free by the count that 'new' inserts just ahead of the allocated block while returning the reference to the beginning of the next word boundary after this...i'm trying to take advantage of this to not rely on '\0' as a termination marker to a c-style string and have embedded '\0' just like the facilities of std::string...more importantly, work with numeric arrays without passing their size..

so for "int* a=new int[x];" i'm trying to use "*(a-1)" ... but it's neither returning the (number of elements) nor (number of elements)*sizeof(element) though each time something close to the second value...for instance if x=10 then the returned value is in the range [45 to 49] ...

am i doing/interpreting something conceptually wrong?