I am aware that the size of a pointer is fixed (not the size of the data it points to). Now given that, supposing I have a vector of data in global scope and I declare a pointer
If I understand your question right, you want to know how much memory your vector consumes. This will be the fixed size of a pointer (32 or 64 bit) times the amount of pointers stored in it, plus some extra bytes for the size field and stuff. So in most cases you won't recognise the memory it uses.
However, you should definitly not do it like you did in your code example. Because a std::vector my change the position where it saves your data. E.g. if you push_back new objects, it eventually will have to allocate new memory and copy the data to the newly allocated space, since it guarantees that the data space is continues. It then will free the memory used bevore. Your old Pointers will then point into space which is not used by your programm any more causing segmentation faults if you try to use them.